public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "denes.matetelki at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/61075] parallel std::accumulate reduct type cannot be different than the iterated type
Date: Fri, 16 May 2014 14:53:00 -0000	[thread overview]
Message-ID: <bug-61075-4-ekUxMcCF1F@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61075-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61075

--- Comment #8 from Denes Matetelki <denes.matetelki at gmail dot com> ---
Just an observation:

The contained type also need to declare and define ctor(int).

Which can be tricky, if it is a template class and:

template <typename T>
class Custom
{
public:
  Custom(T t) : m_t(t) {}
  Custom(int i) : m_t() {}
  explicit operator int() const { return convertToInt(m_t); }

private:
  T m_t;
};

Custom<int> c; // ambigous ctor(int)


      parent reply	other threads:[~2014-05-16 14:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-61075-4@http.gcc.gnu.org/bugzilla/>
2014-05-06  9:47 ` [Bug c++/61075] " denes.matetelki at gmail dot com
2014-05-06 10:55 ` [Bug libstdc++/61075] " denes.matetelki at gmail dot com
2014-05-06 14:54 ` redi at gcc dot gnu.org
2014-05-13  9:07 ` denes.matetelki at gmail dot com
2014-05-13  9:24 ` redi at gcc dot gnu.org
2014-05-13 10:45 ` denes.matetelki at gmail dot com
2014-05-13 10:48 ` redi at gcc dot gnu.org
2014-05-16 14:53 ` denes.matetelki at gmail dot com [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-61075-4-ekUxMcCF1F@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).