id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 10401,phoenix::bind called with shared_ptr::get as member function pointer does not compile with clang 3.5,Adam Romanek ,Thomas Heller,"The code to reproduce this issue is fairly simple: {{{ #include #include typedef boost::shared_ptr sptr; int main() { boost::phoenix::bind(&sptr::get, boost::phoenix::placeholders::arg1); } }}} Here's what clang says: {{{ clang++-3.5 -O2 -I/home/A.Romanek/tmp/boost/boost_1_56_0 -c -o test.o test.cpp In file included from test.cpp:1: In file included from /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix.hpp:11: In file included from /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/phoenix.hpp:17: In file included from /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/bind.hpp:14: In file included from /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/bind/bind_member_variable.hpp:13: /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/bind/detail/member_variable.hpp:50:15: error: reference to function type 'int *() const' cannot have 'const' qualifier RT& operator()(Class& obj) const ^ /home/A.Romanek/tmp/boost/boost_1_56_0/boost/proto/domain.hpp:145:40: note: in instantiation of template class 'boost::phoenix::detail::member_variable::*)() const>' requested here struct as_expr ^ /home/A.Romanek/tmp/boost/boost_1_56_0/boost/proto/make_expr.hpp:78:13: note: during template argument deduction for class template partial specialization 'as_expr' [with T = boost::phoenix::detail::member_variable::*)() const>] : Domain::template as_expr ^ /home/A.Romanek/tmp/boost/boost_1_56_0/boost/proto/detail/preprocessed/make_expr_.hpp:68:48: note: in instantiation of template class 'boost::proto::detail::protoify::*)() const>, boost::proto::domainns_::basic_default_domain>' requested here typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type ^ /home/A.Romanek/tmp/boost/boost_1_56_0/boost/proto/make_expr.hpp:180:34: note: in instantiation of template class 'boost::proto::detail::make_expr_::*)() const>, boost::phoenix::actor >, 0> >, void, void, void, void, void, void, void, void, void>' requested here typename detail::make_expr_< ^ /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/core/preprocessed/expression_10.hpp:80:40: note: in instantiation of template class 'boost::proto::result_of::make_expr::*)() const>, boost::phoenix::actor >, 0> >, void, void, void, void, void, void, void, void, void>' requested here typename proto::result_of::make_expr< ^ /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/core/preprocessed/expression_10.hpp:24:19: note: in instantiation of template class 'boost::phoenix::expr_ext::*)() const>, boost::phoenix::actor >, 0> >, void, void, void, void, void, void, void, void, void>' requested here struct expr : expr_ext {}; ^ /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/core/detail/preprocessed/function_eval_10.hpp:7:588: note: in instantiation of template class 'boost::phoenix::expr::*)() const>, boost::phoenix::actor >, 0> >, void, void, void, void, void, void, void, void, void>' requested here /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/bind/bind_member_variable.hpp:20:29: note: in instantiation of template class 'boost::phoenix::detail::expression::function_eval::*)() const>, boost::phoenix::actor >, 0> >, void, void, void, void, void, void, void, void, void>' requested here detail::expression::function_eval< ^ test.cpp:7:3: note: while substituting deduced template arguments into function template 'bind' [with RT = int *() const, ClassT = boost::shared_ptr, ClassA = boost::phoenix::actor >, 0> >] boost::phoenix::bind(&sptr::get, boost::phoenix::placeholders::arg1); ^ In file included from test.cpp:1: In file included from /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix.hpp:11: In file included from /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/phoenix.hpp:17: In file included from /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/bind.hpp:14: In file included from /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/bind/bind_member_variable.hpp:13: /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/bind/detail/member_variable.hpp:59:15: error: reference to function type 'int *() const' cannot have 'const' qualifier RT& operator()(Class* obj) const ^ /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/bind/detail/member_variable.hpp:65:21: error: reference to function type 'int *() const' cannot have 'const' qualifier RT const& operator()(Class const& obj) const ^ /home/A.Romanek/tmp/boost/boost_1_56_0/boost/phoenix/bind/detail/member_variable.hpp:74:21: error: reference to function type 'int *() const' cannot have 'const' qualifier RT const& operator()(Class const* obj) const ^ 4 errors generated. }}} Clang version is: {{{ Ubuntu clang version 3.5.0-svn215833-1~exp1 (branches/release_35) (based on LLVM 3.5.0) Target: x86_64-pc-linux-gnu Thread model: posix }}} It does not matter whether the code is compiled in C++03 or C++11 mode. The same example compiles without errors on gcc 4.8.2. Note that switching from Boost.Phoenix to Boost.Bind makes the code compile without a problem: {{{ #include #include typedef boost::shared_ptr sptr; int main() { boost::bind(&sptr::get, _1); } }}}",Bugs,closed,To Be Determined,phoenix,Boost 1.56.0,Problem,fixed,clang,