id summary reporter owner description type status milestone component version severity resolution keywords cc 7872 sregex::compile fails to compile with clang+libc++ Thomas Goyne Eric Niebler "Given a basic test program: {{{ #include int main() { boost::xpressive::sregex::compile(""x""); } }}} This compiles with no errors when using libstdc++ (with clang++ -std=c++11 -Weverything test.cpp). However, switching to libc++ gives the following result: {{{ $ clang++ --version [2s] Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn) Target: x86_64-apple-darwin12.2.0 Thread model: posix $ clang++ -std=c++11 -Weverything -stdlib=libc++ test.cpp In file included from test.cpp:1: In file included from /usr/local/include/boost/xpressive/xpressive.hpp:18: In file included from /usr/local/include/boost/xpressive/xpressive_static.hpp:24: In file included from /usr/local/include/boost/xpressive/regex_primitives.hpp:12: In file included from /usr/bin/../lib/c++/v1/vector:261: In file included from /usr/bin/../lib/c++/v1/__bit_reference:15: In file included from /usr/bin/../lib/c++/v1/algorithm:591: /usr/bin/../lib/c++/v1/type_traits:2455:67: error: no member named 'value' in 'std::__1::is_constructible>, boost::xpressive::basic_regex> &>' : __is_nothrow_constructible::value, _Tp, _Args...> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ /usr/bin/../lib/c++/v1/type_traits:2583:14: note: in instantiation of template class 'std::__1::is_nothrow_constructible>, boost::xpressive::basic_regex> &>' requested here : public is_nothrow_constructible<_Tp, const typename add_lvalue_reference<_Tp>::type> ^ /usr/bin/../lib/c++/v1/utility:241:20: note: in instantiation of template class 'std::__1::is_nothrow_copy_constructible>>' requested here is_nothrow_copy_constructible::value) ^ /usr/bin/../lib/c++/v1/__config:253:34: note: expanded from macro '_NOEXCEPT_' # define _NOEXCEPT_(x) noexcept(x) ^ /usr/bin/../lib/c++/v1/__tree:602:16: note: in instantiation of template class 'std::__1::pair, boost::xpressive::basic_regex>>' requested here value_type __value_; ^ /usr/bin/../lib/c++/v1/type_traits:1889:54: note: in instantiation of template class 'std::__1::__tree_node, boost::xpressive::basic_regex>>, void *>' requested here decltype(_VSTD::move(_Tp(_VSTD::declval<_Args>()...)), true_type()) ^ /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::xpressive::basic_regex>>, void *>>, _Args = ] __is_constructible_test(_Tp&&, _Args&& ...); ^ /usr/bin/../lib/c++/v1/type_traits:1949:14: note: (skipping 6 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) : public __is_constructible::value || is_reference<_Tp>::value, ^ /usr/bin/../lib/c++/v1/__tree:813:56: note: in instantiation of template class 'std::__1::__compressed_pair *>, std::__1::allocator, boost::xpressive::basic_regex>>, void *>>>' requested here __compressed_pair<__end_node_t, __node_allocator> __pair1_; ^ /usr/bin/../lib/c++/v1/map:711:22: note: in instantiation of template class 'std::__1::__tree, boost::xpressive::basic_regex>>, std::__1::__map_value_compare, boost::xpressive::basic_regex>, std::__1::less>, true>, std::__1::allocator, boost::xpressive::basic_regex>>>>' requested here typedef typename __base::__node_traits __node_traits; ^ /usr/local/include/boost/xpressive/regex_compiler.hpp:739:51: note: in instantiation of template class 'std::__1::map, boost::xpressive::basic_regex>, std::__1::less>, std::__1::allocator, boost::xpressive::basic_regex>>>>' requested here std::map > rules_; ^ /usr/local/include/boost/xpressive/basic_regex.hpp:200:16: note: in instantiation of template class 'boost::xpressive::regex_compiler, boost::xpressive::regex_traits>, boost::xpressive::compiler_traits>>>' requested here return regex_compiler().compile(begin, flags); ^ test.cpp:3:3: note: in instantiation of member function 'boost::xpressive::basic_regex >::compile' requested here boost::xpressive::sregex::compile(""x""); ^ In file included from test.cpp:1: In file included from /usr/local/include/boost/xpressive/xpressive.hpp:18: In file included from /usr/local/include/boost/xpressive/xpressive_static.hpp:24: In file included from /usr/local/include/boost/xpressive/regex_primitives.hpp:12: In file included from /usr/bin/../lib/c++/v1/vector:261: In file included from /usr/bin/../lib/c++/v1/__bit_reference:15: In file included from /usr/bin/../lib/c++/v1/algorithm:591: /usr/bin/../lib/c++/v1/type_traits:2616:64: error: no member named 'value' in 'std::__1::is_assignable> &, boost::xpressive::basic_regex> &>' : public __is_nothrow_assignable::value, _Tp, _Arg> ~~~~~~~~~~~~~~~~~~~~~~~~~~^ /usr/bin/../lib/c++/v1/type_traits:2667:14: note: in instantiation of template class 'std::__1::is_nothrow_assignable> &, boost::xpressive::basic_regex> &>' requested here : public is_nothrow_assignable::type, ^ /usr/bin/../lib/c++/v1/utility:250:20: note: in instantiation of template class 'std::__1::is_nothrow_copy_assignable>>' requested here is_nothrow_copy_assignable::value) ^ /usr/bin/../lib/c++/v1/__config:253:34: note: expanded from macro '_NOEXCEPT_' # define _NOEXCEPT_(x) noexcept(x) ^ /usr/bin/../lib/c++/v1/__tree:602:16: note: in instantiation of template class 'std::__1::pair, boost::xpressive::basic_regex>>' requested here value_type __value_; ^ /usr/bin/../lib/c++/v1/type_traits:1889:54: note: in instantiation of template class 'std::__1::__tree_node, boost::xpressive::basic_regex>>, void *>' requested here decltype(_VSTD::move(_Tp(_VSTD::declval<_Args>()...)), true_type()) ^ /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::xpressive::basic_regex>>, void *>>, _Args = ] __is_constructible_test(_Tp&&, _Args&& ...); ^ /usr/bin/../lib/c++/v1/type_traits:1949:14: note: (skipping 6 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) : public __is_constructible::value || is_reference<_Tp>::value, ^ /usr/bin/../lib/c++/v1/__tree:813:56: note: in instantiation of template class 'std::__1::__compressed_pair *>, std::__1::allocator, boost::xpressive::basic_regex>>, void *>>>' requested here __compressed_pair<__end_node_t, __node_allocator> __pair1_; ^ /usr/bin/../lib/c++/v1/map:711:22: note: in instantiation of template class 'std::__1::__tree, boost::xpressive::basic_regex>>, std::__1::__map_value_compare, boost::xpressive::basic_regex>, std::__1::less>, true>, std::__1::allocator, boost::xpressive::basic_regex>>>>' requested here typedef typename __base::__node_traits __node_traits; ^ /usr/local/include/boost/xpressive/regex_compiler.hpp:739:51: note: in instantiation of template class 'std::__1::map, boost::xpressive::basic_regex>, std::__1::less>, std::__1::allocator, boost::xpressive::basic_regex>>>>' requested here std::map > rules_; ^ /usr/local/include/boost/xpressive/basic_regex.hpp:200:16: note: in instantiation of template class 'boost::xpressive::regex_compiler, boost::xpressive::regex_traits>, boost::xpressive::compiler_traits>>>' requested here return regex_compiler().compile(begin, flags); ^ test.cpp:3:3: note: in instantiation of member function 'boost::xpressive::basic_regex >::compile' requested here boost::xpressive::sregex::compile(""x""); ^ In file included from test.cpp:1: In file included from /usr/local/include/boost/xpressive/xpressive.hpp:18: In file included from /usr/local/include/boost/xpressive/xpressive_static.hpp:24: In file included from /usr/local/include/boost/xpressive/regex_primitives.hpp:12: In file included from /usr/bin/../lib/c++/v1/vector:261: In file included from /usr/bin/../lib/c++/v1/__bit_reference:15: In file included from /usr/bin/../lib/c++/v1/algorithm:591: /usr/bin/../lib/c++/v1/type_traits:2455:67: error: no member named 'value' in 'std::__1::is_constructible>, boost::xpressive::basic_regex> &&>' : __is_nothrow_constructible::value, _Tp, _Args...> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ /usr/bin/../lib/c++/v1/type_traits:2590:14: note: in instantiation of template class 'std::__1::is_nothrow_constructible>, boost::xpressive::basic_regex> &&>' requested here : public is_nothrow_constructible<_Tp, typename add_rvalue_reference<_Tp>::type> ^ /usr/bin/../lib/c++/v1/utility:278:33: note: in instantiation of template class 'std::__1::is_nothrow_move_constructible>>' requested here is_nothrow_move_constructible::value) ^ /usr/bin/../lib/c++/v1/__config:253:34: note: expanded from macro '_NOEXCEPT_' # define _NOEXCEPT_(x) noexcept(x) ^ /usr/bin/../lib/c++/v1/__tree:602:16: note: in instantiation of template class 'std::__1::pair, boost::xpressive::basic_regex>>' requested here value_type __value_; ^ /usr/bin/../lib/c++/v1/type_traits:1889:54: note: in instantiation of template class 'std::__1::__tree_node, boost::xpressive::basic_regex>>, void *>' requested here decltype(_VSTD::move(_Tp(_VSTD::declval<_Args>()...)), true_type()) ^ /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::xpressive::basic_regex>>, void *>>, _Args = ] __is_constructible_test(_Tp&&, _Args&& ...); ^ /usr/bin/../lib/c++/v1/type_traits:1949:14: note: (skipping 6 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) : public __is_constructible::value || is_reference<_Tp>::value, ^ /usr/bin/../lib/c++/v1/__tree:813:56: note: in instantiation of template class 'std::__1::__compressed_pair *>, std::__1::allocator, boost::xpressive::basic_regex>>, void *>>>' requested here __compressed_pair<__end_node_t, __node_allocator> __pair1_; ^ /usr/bin/../lib/c++/v1/map:711:22: note: in instantiation of template class 'std::__1::__tree, boost::xpressive::basic_regex>>, std::__1::__map_value_compare, boost::xpressive::basic_regex>, std::__1::less>, true>, std::__1::allocator, boost::xpressive::basic_regex>>>>' requested here typedef typename __base::__node_traits __node_traits; ^ /usr/local/include/boost/xpressive/regex_compiler.hpp:739:51: note: in instantiation of template class 'std::__1::map, boost::xpressive::basic_regex>, std::__1::less>, std::__1::allocator, boost::xpressive::basic_regex>>>>' requested here std::map > rules_; ^ /usr/local/include/boost/xpressive/basic_regex.hpp:200:16: note: in instantiation of template class 'boost::xpressive::regex_compiler, boost::xpressive::regex_traits>, boost::xpressive::compiler_traits>>>' requested here return regex_compiler().compile(begin, flags); ^ test.cpp:3:3: note: in instantiation of member function 'boost::xpressive::basic_regex >::compile' requested here boost::xpressive::sregex::compile(""x""); ^ In file included from test.cpp:1: In file included from /usr/local/include/boost/xpressive/xpressive.hpp:18: In file included from /usr/local/include/boost/xpressive/xpressive_static.hpp:24: In file included from /usr/local/include/boost/xpressive/regex_primitives.hpp:12: In file included from /usr/bin/../lib/c++/v1/vector:261: In file included from /usr/bin/../lib/c++/v1/__bit_reference:15: In file included from /usr/bin/../lib/c++/v1/algorithm:591: /usr/bin/../lib/c++/v1/type_traits:2616:64: error: no member named 'value' in 'std::__1::is_assignable> &, boost::xpressive::basic_regex> &&>' : public __is_nothrow_assignable::value, _Tp, _Arg> ~~~~~~~~~~~~~~~~~~~~~~~~~~^ /usr/bin/../lib/c++/v1/type_traits:2674:14: note: in instantiation of template class 'std::__1::is_nothrow_assignable> &, boost::xpressive::basic_regex> &&>' requested here : public is_nothrow_assignable::type, ^ /usr/bin/../lib/c++/v1/utility:287:38: note: in instantiation of template class 'std::__1::is_nothrow_move_assignable>>' requested here is_nothrow_move_assignable::value) ^ /usr/bin/../lib/c++/v1/__config:253:34: note: expanded from macro '_NOEXCEPT_' # define _NOEXCEPT_(x) noexcept(x) ^ /usr/bin/../lib/c++/v1/__tree:602:16: note: in instantiation of template class 'std::__1::pair, boost::xpressive::basic_regex>>' requested here value_type __value_; ^ /usr/bin/../lib/c++/v1/type_traits:1889:54: note: in instantiation of template class 'std::__1::__tree_node, boost::xpressive::basic_regex>>, void *>' requested here decltype(_VSTD::move(_Tp(_VSTD::declval<_Args>()...)), true_type()) ^ /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::xpressive::basic_regex>>, void *>>, _Args = ] __is_constructible_test(_Tp&&, _Args&& ...); ^ /usr/bin/../lib/c++/v1/type_traits:1949:14: note: (skipping 6 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) : public __is_constructible::value || is_reference<_Tp>::value, ^ /usr/bin/../lib/c++/v1/__tree:813:56: note: in instantiation of template class 'std::__1::__compressed_pair *>, std::__1::allocator, boost::xpressive::basic_regex>>, void *>>>' requested here __compressed_pair<__end_node_t, __node_allocator> __pair1_; ^ /usr/bin/../lib/c++/v1/map:711:22: note: in instantiation of template class 'std::__1::__tree, boost::xpressive::basic_regex>>, std::__1::__map_value_compare, boost::xpressive::basic_regex>, std::__1::less>, true>, std::__1::allocator, boost::xpressive::basic_regex>>>>' requested here typedef typename __base::__node_traits __node_traits; ^ /usr/local/include/boost/xpressive/regex_compiler.hpp:739:51: note: in instantiation of template class 'std::__1::map, boost::xpressive::basic_regex>, std::__1::less>, std::__1::allocator, boost::xpressive::basic_regex>>>>' requested here std::map > rules_; ^ /usr/local/include/boost/xpressive/basic_regex.hpp:200:16: note: in instantiation of template class 'boost::xpressive::regex_compiler, boost::xpressive::regex_traits>, boost::xpressive::compiler_traits>>>' requested here return regex_compiler().compile(begin, flags); ^ test.cpp:3:3: note: in instantiation of member function 'boost::xpressive::basic_regex >::compile' requested here boost::xpressive::sregex::compile(""x""); ^ In file included from test.cpp:1: In file included from /usr/local/include/boost/xpressive/xpressive.hpp:18: In file included from /usr/local/include/boost/xpressive/xpressive_static.hpp:24: In file included from /usr/local/include/boost/xpressive/regex_primitives.hpp:12: In file included from /usr/bin/../lib/c++/v1/vector:261: In file included from /usr/bin/../lib/c++/v1/__bit_reference:15: In file included from /usr/bin/../lib/c++/v1/algorithm:593: /usr/bin/../lib/c++/v1/utility:241:64: error: no member named 'value' in 'std::__1::is_nothrow_copy_constructible>>' is_nothrow_copy_constructible::value) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ /usr/bin/../lib/c++/v1/__config:253:34: note: expanded from macro '_NOEXCEPT_' # define _NOEXCEPT_(x) noexcept(x) ^ /usr/bin/../lib/c++/v1/type_traits:1889:54: note: in instantiation of template class 'std::__1::pair, boost::xpressive::basic_regex>>' requested here decltype(_VSTD::move(_Tp(_VSTD::declval<_Args>()...)), true_type()) ^ /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::xpressive::basic_regex>>>, _Args = ] __is_constructible_test(_Tp&&, _Args&& ...); ^ /usr/bin/../lib/c++/v1/type_traits:1949:14: note: in instantiation of template class 'std::__1::__is_constructible, boost::xpressive::basic_regex>>>, >' requested here : public __is_constructible::value || is_reference<_Tp>::value, ^ /usr/bin/../lib/c++/v1/type_traits:1975:14: note: in instantiation of template class 'std::__1::__is_constructible_void_check, boost::xpressive::basic_regex>>>, >' requested here : public __is_constructible_void_check<__contains_void<_Tp, _Args...>::value ^ /usr/bin/../lib/c++/v1/type_traits:2455:34: note: in instantiation of template class 'std::__1::is_constructible, boost::xpressive::basic_regex>>>, >' requested here : __is_nothrow_constructible::value, _Tp, _Args...> ^ /usr/bin/../lib/c++/v1/type_traits:2577:14: note: in instantiation of template class 'std::__1::is_nothrow_constructible, boost::xpressive::basic_regex>>>, >' requested here : public is_nothrow_constructible<_Tp> ^ /usr/bin/../lib/c++/v1/map:729:13: note: in instantiation of template class 'std::__1::is_nothrow_default_constructible, boost::xpressive::basic_regex>>>>' requested here is_nothrow_default_constructible::value && ^ /usr/bin/../lib/c++/v1/__config:253:34: note: expanded from macro '_NOEXCEPT_' # define _NOEXCEPT_(x) noexcept(x) ^ /usr/local/include/boost/xpressive/regex_compiler.hpp:739:51: note: in instantiation of template class 'std::__1::map, boost::xpressive::basic_regex>, std::__1::less>, std::__1::allocator, boost::xpressive::basic_regex>>>>' requested here std::map > rules_; ^ /usr/local/include/boost/xpressive/basic_regex.hpp:200:16: note: in instantiation of template class 'boost::xpressive::regex_compiler, boost::xpressive::regex_traits>, boost::xpressive::compiler_traits>>>' requested here return regex_compiler().compile(begin, flags); ^ test.cpp:3:3: note: in instantiation of member function 'boost::xpressive::basic_regex >::compile' requested here boost::xpressive::sregex::compile(""x""); ^ In file included from test.cpp:1: In file included from /usr/local/include/boost/xpressive/xpressive.hpp:18: In file included from /usr/local/include/boost/xpressive/xpressive_static.hpp:24: In file included from /usr/local/include/boost/xpressive/regex_primitives.hpp:12: In file included from /usr/bin/../lib/c++/v1/vector:261: In file included from /usr/bin/../lib/c++/v1/__bit_reference:15: In file included from /usr/bin/../lib/c++/v1/algorithm:593: /usr/bin/../lib/c++/v1/utility:250:61: error: no member named 'value' in 'std::__1::is_nothrow_copy_assignable>>' is_nothrow_copy_assignable::value) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ /usr/bin/../lib/c++/v1/__config:253:34: note: expanded from macro '_NOEXCEPT_' # define _NOEXCEPT_(x) noexcept(x) ^ In file included from test.cpp:1: In file included from /usr/local/include/boost/xpressive/xpressive.hpp:18: In file included from /usr/local/include/boost/xpressive/xpressive_static.hpp:24: In file included from /usr/local/include/boost/xpressive/regex_primitives.hpp:12: In file included from /usr/bin/../lib/c++/v1/vector:261: In file included from /usr/bin/../lib/c++/v1/__bit_reference:15: In file included from /usr/bin/../lib/c++/v1/algorithm:593: /usr/bin/../lib/c++/v1/utility:278:77: error: no member named 'value' in 'std::__1::is_nothrow_move_constructible>>' is_nothrow_move_constructible::value) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ /usr/bin/../lib/c++/v1/__config:253:34: note: expanded from macro '_NOEXCEPT_' # define _NOEXCEPT_(x) noexcept(x) ^ In file included from test.cpp:1: In file included from /usr/local/include/boost/xpressive/xpressive.hpp:18: In file included from /usr/local/include/boost/xpressive/xpressive_static.hpp:24: In file included from /usr/local/include/boost/xpressive/regex_primitives.hpp:12: In file included from /usr/bin/../lib/c++/v1/vector:261: In file included from /usr/bin/../lib/c++/v1/__bit_reference:15: In file included from /usr/bin/../lib/c++/v1/algorithm:593: /usr/bin/../lib/c++/v1/utility:287:79: error: no member named 'value' in 'std::__1::is_nothrow_move_assignable>>' is_nothrow_move_assignable::value) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ /usr/bin/../lib/c++/v1/__config:253:34: note: expanded from macro '_NOEXCEPT_' # define _NOEXCEPT_(x) noexcept(x) ^ 8 errors generated. }}}_Tp, _Args..." Bugs closed To Be Determined xpressive Boost 1.52.0 Problem worksforme