id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 7061,xcode 4.5 does not compile code which uses boost::statechart,bychkov.anton@…,Andreas Huber,"The following source code does not compile in XCode 4.5 (it is developer preview 2 version at this moment). I've got answer from one of the apple guys: ""It's a known issue that when using libc++ in C++11 mode, instantiating std::list causes instantiation of the element type more aggressively than other std::list implementations. This probably won't be fixed for Xcode 4.5."" {{{ #include #include #include #include class InitialState; class StateMachine : public boost::statechart::state_machine { public: StateMachine() { } }; class InitialState : public boost::statechart::simple_state { public: InitialState() { } }; int main(int argc, char const* argv[]) { std::cout << ""Hello, World!\n""; StateMachine s; return 0; } }}} Errors are: {{{ In file included from /Users/developer/Downloads/Sandbox/Sandbox/main.cpp:12: In file included from /usr/local/boost_1_50_0/boost/statechart/state.hpp:11: In file included from /usr/local/boost_1_50_0/boost/statechart/simple_state.hpp:13: /usr/local/boost_1_50_0/boost/statechart/detail/leaf_state.hpp:26:27: error: base class has incomplete type class leaf_state : public state_base< Allocator, RttiPolicy > ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Developer4/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:1889:54: note: in instantiation of template class 'boost::statechart::detail::leaf_state, boost::statechart::detail::rtti_policy>' requested here decltype(_VSTD::move(_Tp(_VSTD::declval<_Args>()...)), true_type()) ^ /Developer4/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:1890:1: note: while substituting deduced template arguments into function template '__is_constructible_test' [with _Tp = std::__1::allocator, boost::statechart::detail::rtti_policy>>, void *>>, _Args = ] __is_constructible_test(_Tp&&, _Args&& ...); ^ /Developer4/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:1949:14: note: in instantiation of template class 'std::__1::__is_constructible, boost::statechart::detail::rtti_policy>>, void *>>, std::__1::allocator, boost::statechart::detail::rtti_policy>>, void *>> &&>' requested here : public __is_constructible::value || is_reference<_Tp>::value, ^ /Developer4/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:1975:14: note: in instantiation of template class 'std::__1::__is_constructible_void_check, boost::statechart::detail::rtti_policy>>, void *>>, std::__1::allocator, boost::statechart::detail::rtti_policy>>, void *>> &&>' requested here : public __is_constructible_void_check<__contains_void<_Tp, _Args...>::value ^ /Developer4/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:2455:34: note: in instantiation of template class 'std::__1::is_constructible, boost::statechart::detail::rtti_policy>>, void *>>, std::__1::allocator, boost::statechart::detail::rtti_policy>>, void *>> &&>' requested here : __is_nothrow_constructible::value, _Tp, _Args...> ^ /Developer4/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:2590:14: note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) : public is_nothrow_constructible<_Tp, typename add_rvalue_reference<_Tp>::type> ^ /Developer4/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/list:513:52: note: in instantiation of template class 'std::__1::__compressed_pair, boost::statechart::detail::rtti_policy>>, void *>>>' requested here __compressed_pair __size_alloc_; ^ /Developer4/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/list:770:15: note: in instantiation of template class 'std::__1::__list_imp, boost::statechart::detail::rtti_policy>>, std::__1::allocator, boost::statechart::detail::rtti_policy>>>>' requested here : private __list_imp<_Tp, _Alloc> ^ /usr/local/boost_1_50_0/boost/statechart/detail/state_base.hpp:139:16: note: in instantiation of template class 'std::__1::list, boost::statechart::detail::rtti_policy>>, std::__1::allocator, boost::statechart::detail::rtti_policy>>>>' requested here typename state_list_type::iterator & statesEnd, ^ /usr/local/boost_1_50_0/boost/statechart/state_machine.hpp:510:22: note: in instantiation of template class 'boost::statechart::detail::state_base, boost::statechart::detail::rtti_policy>' requested here typedef typename state_base_type::node_state_base_ptr_type ^ /Users/developer/Downloads/Sandbox/Sandbox/main.cpp:17:29: note: in instantiation of template class 'boost::statechart::state_machine, boost::statechart::null_exception_translator>' requested here class StateMachine : public boost::statechart::state_machine ^ /usr/local/boost_1_50_0/boost/statechart/detail/state_base.hpp:57:7: note: definition of 'boost::statechart::detail::state_base, boost::statechart::detail::rtti_policy>' is not complete until the closing '}' class state_base : ^ In file included from /Users/developer/Downloads/Sandbox/Sandbox/main.cpp:12: In file included from /usr/local/boost_1_50_0/boost/statechart/state.hpp:11: In file included from /usr/local/boost_1_50_0/boost/statechart/simple_state.hpp:13: /usr/local/boost_1_50_0/boost/statechart/detail/leaf_state.hpp:44:44: error: no type named 'iterator' in 'std::__1::list, boost::statechart::detail::rtti_policy>>, std::__1::allocator, boost::statechart::detail::rtti_policy>>>>' typename base_type::state_list_type::iterator listPosition ) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ /usr/local/boost_1_50_0/boost/statechart/detail/leaf_state.hpp:53:44: error: no type named 'iterator' in 'std::__1::list, boost::statechart::detail::rtti_policy>>, std::__1::allocator, boost::statechart::detail::rtti_policy>>>>' typename base_type::state_list_type::iterator & statesEnd, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ /usr/local/boost_1_50_0/boost/statechart/detail/leaf_state.hpp:73:42: error: no type named 'iterator' in 'std::__1::list, boost::statechart::detail::rtti_policy>>, std::__1::allocator, boost::statechart::detail::rtti_policy>>>>' typename base_type::state_list_type::iterator listPosition_; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ In file included from /Users/developer/Downloads/Sandbox/Sandbox/main.cpp:12: In file included from /usr/local/boost_1_50_0/boost/statechart/state.hpp:11: /usr/local/boost_1_50_0/boost/statechart/simple_state.hpp:505:27: error: no type named 'direct_state_base_ptr_type' in 'boost::statechart::detail::rtti_policy::rtti_derived_type, boost::statechart::detail::rtti_policy>>' typename base_type::direct_state_base_ptr_type & pSelf, ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/developer/Downloads/Sandbox/Sandbox/main.cpp:25:29: note: in instantiation of template class 'boost::statechart::simple_state, 0>' requested here class InitialState : public boost::statechart::simple_state ^ In file included from /Users/developer/Downloads/Sandbox/Sandbox/main.cpp:12: In file included from /usr/local/boost_1_50_0/boost/statechart/state.hpp:11: In file included from /usr/local/boost_1_50_0/boost/statechart/simple_state.hpp:11: In file included from /usr/local/boost_1_50_0/boost/statechart/event.hpp:11: In file included from /usr/local/boost_1_50_0/boost/statechart/event_base.hpp:15: In file included from /usr/local/boost_1_50_0/boost/intrusive_ptr.hpp:16: /usr/local/boost_1_50_0/boost/smart_ptr/intrusive_ptr.hpp:96:23: error: no matching function for call to 'intrusive_ptr_release' if( px != 0 ) intrusive_ptr_release( px ); ^~~~~~~~~~~~~~~~~~~~~ /Developer4/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:1621:23: note: in instantiation of member function 'boost::intrusive_ptr, boost::statechart::detail::rtti_policy> >::~intrusive_ptr' requested here __p->~_Tp(); ^ /Developer4/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:1522:14: note: in instantiation of function template specialization 'std::__1::allocator_traits, boost::statechart::detail::rtti_policy>>, void *>> >::__destroy, boost::statechart::detail::rtti_policy>> >' requested here {__destroy(__has_destroy(), __a, __p);} ^ /Developer4/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/list:685:34: note: in instantiation of function template specialization 'std::__1::allocator_traits, boost::statechart::detail::rtti_policy>>, void *>> >::destroy, boost::statechart::detail::rtti_policy>> >' requested here __node_alloc_traits::destroy(__na, _VSTD::addressof(__n.__value_)); ^ /Developer4/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/list:664:5: note: in instantiation of member function 'std::__1::__list_imp, boost::statechart::detail::rtti_policy>>, std::__1::allocator, boost::statechart::detail::rtti_policy>>> >::clear' requested here clear(); ^ /Developer4/Xcode45-DP2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/list:769:23: note: in instantiation of member function 'std::__1::__list_imp, boost::statechart::detail::rtti_policy>>, std::__1::allocator, boost::statechart::detail::rtti_policy>>> >::~__list_imp' requested here class _LIBCPP_VISIBLE list ^ /Users/developer/Downloads/Sandbox/Sandbox/main.cpp:20:5: note: in instantiation of member function 'boost::statechart::state_machine, boost::statechart::null_exception_translator>::state_machine' requested here StateMachine() ^ /usr/local/boost_1_50_0/boost/statechart/detail/state_base.hpp:165:13: note: candidate template ignored: failed template argument deduction inline void intrusive_ptr_release( ^ 6 errors generated. }}} So, it looks like it became boost's problem. Any help?",Bugs,closed,To Be Determined,statechart,Boost 1.50.0,Showstopper,wontfix,,