public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ppluzhnikov at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59389] [C++11] bogus error: call of overloaded ‘Foo(<brace-enclosed initializer list>)’ is ambiguous
Date: Wed, 04 Dec 2013 19:42:00 -0000	[thread overview]
Message-ID: <bug-59389-4-8cjC2otguG@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-59389-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59389

Paul Pluzhnikov <ppluzhnikov at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |---

--- Comment #2 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
Here is the test that compiles with Clang but not GCC (added explicit to
Foo::Foo):

#include <string>
#include <vector>
#include <map>

struct Foo {
  explicit Foo(const std::map<std::string, std::vector<std::string>>&
machines);
};

int main()
{
  Foo foo2({{"abc", {"aaa", "bbb"}}});  // OK
  Foo foo1({{"abc", {"aaa"}}});         // Error.
}


  reply	other threads:[~2013-12-04 19:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04 19:31 [Bug c++/59389] New: " ppluzhnikov at google dot com
2013-12-04 19:42 ` ppluzhnikov at google dot com [this message]
2013-12-04 21:44 ` [Bug c++/59389] " manu at gcc dot gnu.org
2013-12-15 19:48 ` ppluzhnikov at google dot com
2014-01-26 19:29 ` richard-gccbugzilla at metafoo dot co.uk
2021-07-31 20:37 ` pinskia at gcc dot gnu.org
2024-01-03 21:17 ` vital.had at gmail dot com
2024-01-03 21:24 ` pinskia at gcc dot gnu.org
2024-01-03 21:26 ` pinskia at gcc dot gnu.org

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-59389-4-8cjC2otguG@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).