id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5232,ptr_container compiler error with BOOST_RESULT_OF_DECLTYPE,Nathan Ridge ,Thorsten Ottosen,"The following code: {{{ #include struct A { bool operator<(const A&) const; }; int main() { boost::ptr_set s; return 0; } }}} gives the following compiler errors when compiling with BOOST_RESULT_OF_USE_DECLTYPE defined: {{{ In file included from ../../lib/boost- trunk/boost/preprocessor/iteration/detail/iter/forward1.hpp:52:0, from ../../lib/boost-trunk/boost/utility/result_of.hpp:95, from ../../lib/boost-trunk/boost/ptr_container/indirect_fun.hpp:23, from ../../lib/boost-trunk/boost/ptr_container/ptr_set.hpp:19, from test.cpp:1: ../../lib/boost-trunk/boost/utility/detail/result_of_iterate.hpp: In instantiation of 'boost::detail::cpp0x_result_of_impl(A &)>': ../../lib/boost-trunk/boost/utility/detail/result_of_iterate.hpp:41:8: instantiated from 'boost::result_of(A &)>' ../../lib/boost-trunk/boost/ptr_container/indirect_fun.hpp:107:9: instantiated from 'boost::void_ptr_indirect_fun, A, A>' stl_tree.h:462:31: instantiated from '_Rb_tree< void *, void *, _Identity , boost::void_ptr_indirect_fun, A, A> >' stl_set.h:112:17: instantiated from 'set< void *, boost::void_ptr_indirect_fun, A, A> >' ../../lib/boost-trunk/boost/ptr_container/ptr_set_adapter.hpp:40:21: instantiated from 'boost::ptr_container_detail::set_config< A, set, A, A> >, true >' ../../lib/boost-trunk/boost/ptr_container/detail/reversible_ptr_container.hpp:110:59: instantiated from 'boost::ptr_container_detail::reversible_ptr_container< boost::ptr_container_detail::set_config< A, set, A, A> >, true >, boost::heap_clone_allocator >' ../../lib/boost-trunk/boost/ptr_container/detail/associative_ptr_container.hpp:32:11: instantiated from 'boost::ptr_container_detail::associative_ptr_container< boost::ptr_container_detail::set_config< A, set, A, A> >, true >, boost::heap_clone_allocator >' ../../lib/boost-trunk/boost/ptr_container/ptr_set_adapter.hpp:122:11: instantiated from 'boost::ptr_container_detail::ptr_set_adapter_base< A, set, A, A> > , boost::heap_clone_allocator, true >' ../../lib/boost-trunk/boost/ptr_container/ptr_set_adapter.hpp:299:11: instantiated from 'boost::ptr_set_adapter< A, set, A, A> > , boost::heap_clone_allocator, true >' ../../lib/boost-trunk/boost/ptr_container/ptr_set.hpp:33:11: instantiated from 'boost::ptr_set' ../shared/test/test.cpp:10:23: instantiated from here ../../lib/boost-trunk/boost/utility/detail/result_of_iterate.hpp:64:5: error: no match for call to '(less) (A &)' stl_function.h:230:12: candidate is: stl_function.h:233:7: bool less::operator()(const A &, const A &) const stl_function.h:233:7: candidate expects 2 arguments, 1 provided }}} I am compiling with g++ 4.5 with the --std=c++0x flag. The error goes away if I do not define BOOST_RESULT_OF_USE_DECLTYPE.",Bugs,closed,To Be Determined,ptr_container,Boost Development Trunk,Problem,fixed,,