From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12476 invoked by alias); 4 Nov 2012 13:57:53 -0000 Received: (qmail 12334 invoked by uid 48); 4 Nov 2012 13:57:35 -0000 From: "dave at boostpro dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55206] New: GCC Reports Ambiguity; clang and comeau disagree Date: Sun, 04 Nov 2012 13:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dave at boostpro dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00278.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55206 Bug #: 55206 Summary: GCC Reports Ambiguity; clang and comeau disagree Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: dave@boostpro.com I apologize for not doing the hunt to figure out what the standard says on this one, but since GCC is the outlier I'm reporting it here. The error is: g++ -I ~/src/boost/svn/release -Wall -Wextra -pedantic -Wno-long-long -Wno-unused-parameter -Wno-unused -Wno-parentheses -D_GLIBCXX_DEBUG -g -O0 shared.cpp -o shared In file included from /Users/dave/src/boost/svn/release/boost/make_shared.hpp:15:0, from shared.cpp:24: /Users/dave/src/boost/svn/release/boost/smart_ptr/make_shared.hpp: In instantiation of 'boost::shared_ptr boost::make_shared(const A1&) [with T = json_store; A1 = boost::rv]': shared.cpp:261:65: required from 'static json_value::stored_type json_value::make_storage(T&, boost::false_type, boost::false_type) [with T = json_string; json_value::stored_type = boost::shared_ptr; boost::false_type = boost::integral_constant]' shared.cpp:176:9: required from 'json_value::json_value(T) [with T = json_string]' shared.cpp:300:41: required from here /Users/dave/src/boost/svn/release/boost/smart_ptr/make_shared.hpp:660:5: error: call of overloaded 'json_string(const boost::rv&)' is ambiguous /Users/dave/src/boost/svn/release/boost/smart_ptr/make_shared.hpp:660:5: note: candidates are: shared.cpp:65:5: note: json_string::json_string(const json_string&) shared.cpp:61:5: note: json_string::json_string(json_string::rep_t) shared.cpp:145:5: error: initializing argument 1 of 'json_store::json_store(T) [with T = json_string]' make: *** [shared] Error 1 Compilation exited abnormally with code 2 at Sun Nov 4 08:45:44