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: unassig...@gcc.gnu.org

        ReportedBy: d...@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<T> boost::make_shared(const A1&) [with T =

json_store<json_string>; A1 = boost::rv<json_string>]':

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<json_base>;

boost::false_type = boost::integral_constant<bool, false>]'

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<json_string>&)' 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<T>::json_store(T) [with T = json_string]'

make: *** [shared] Error 1



Compilation exited abnormally with code 2 at Sun Nov  4 08:45:44

Reply via email to