Re: [Boost-bugs] [Boost C++ Libraries] #13387: Test header fails to compile

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #13387: Test header fails to compile
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-01-10 23:19:01


#13387: Test header fails to compile
----------------------------------------+-------------------------------
  Reporter: Tony Lewis <tonyelewis@…> | Owner: Gennadiy Rozental
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: test
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords: test,header,data
----------------------------------------+-------------------------------

Comment (by Tony Lewis <tonyelewis@…>):

 I should say: the above errors are from GCC 6.2.

 Clang 5.0 gives:

 {{{
 In file included from geoff.cpp:1:
 In file included from /tmp/test-
 develop/include/boost/test/data/test_case.hpp:17:
 In file included from /tmp/test-
 develop/include/boost/test/data/dataset.hpp:16:
 In file included from /tmp/test-
 develop/include/boost/test/data/monomorphic.hpp:16:
 In file included from /tmp/test-
 develop/include/boost/test/data/monomorphic/array.hpp:17:
 In file included from /tmp/test-
 develop/include/boost/test/data/monomorphic/fwd.hpp:19:
 /tmp/test-develop/include/boost/test/utils/is_forward_iterable.hpp:204:5:
 error: unknown type name 'BOOST_STATIC_ASSERT'
     BOOST_STATIC_ASSERT((is_forward_iterable<T>::value)); //, "only for
 forward iterable types");
     ^
 /tmp/test-develop/include/boost/test/utils/is_forward_iterable.hpp:204:50:
 error: non-friend class member 'value' cannot have a qualified name
     BOOST_STATIC_ASSERT((is_forward_iterable<T>::value)); //, "only for
 forward iterable types");
                          ~~~~~~~~~~~~~~~~~~~~~~~~^
 /tmp/test-develop/include/boost/test/utils/is_forward_iterable.hpp:221:22:
 error: no template named 'add_const' in namespace 'boost'; did you mean
 'std::add_const'?
     typedef typename boost::add_const<T>::type T_const;
                      ^~~~~~~
 /opt/clang+llvm-5.0.0-linux-
 x86_64-ubuntu16.04/bin/../include/c++/v1/type_traits:1033:50: note:
 'std::add_const' declared here
 template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_const
                                                  ^
 In file included from geoff.cpp:1:
 In file included from /tmp/test-
 develop/include/boost/test/data/test_case.hpp:17:
 In file included from /tmp/test-
 develop/include/boost/test/data/dataset.hpp:16:
 In file included from /tmp/test-
 develop/include/boost/test/data/monomorphic.hpp:16:
 In file included from /tmp/test-
 develop/include/boost/test/data/monomorphic/array.hpp:17:
 In file included from /tmp/test-
 develop/include/boost/test/data/monomorphic/fwd.hpp:19:
 /tmp/test-develop/include/boost/test/utils/is_forward_iterable.hpp:222:22:
 error: no template named 'add_pointer' in namespace 'boost'; did you mean
 'std::add_pointer'?
     typedef typename boost::add_pointer<T_const>::type const_iterator;
                      ^~~~~~~
 /opt/clang+llvm-5.0.0-linux-
 x86_64-ubuntu16.04/bin/../include/c++/v1/type_traits:1171:50: note:
 'std::add_pointer' declared here
 template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_pointer
                                                  ^
 In file included from geoff.cpp:1:
 In file included from /tmp/test-
 develop/include/boost/test/data/test_case.hpp:17:
 In file included from /tmp/test-
 develop/include/boost/test/data/dataset.hpp:16:
 In file included from /tmp/test-
 develop/include/boost/test/data/monomorphic.hpp:16:
 In file included from /tmp/test-
 develop/include/boost/test/data/monomorphic/array.hpp:17:
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:122:33:
 error: use of undeclared identifier 'is_container_forward_iterable'
 inline typename std::enable_if<!is_container_forward_iterable<T>::value &&
                                 ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:122:63:
 error: 'T' does not refer to a value
 inline typename std::enable_if<!is_container_forward_iterable<T>::value &&
                                                               ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:121:19:
 note: declared here
 template<typename T>
                   ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:122:67:
 error: definition or redeclaration of 'value' cannot name the global scope
 inline typename std::enable_if<!is_container_forward_iterable<T>::value &&
                                                                 ~~^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:122:67:
 error: no member named 'value' in the global namespace
 inline typename std::enable_if<!is_container_forward_iterable<T>::value &&
                                                                 ~~^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:122:72:
 error: expected ';' at end of declaration
 inline typename std::enable_if<!is_container_forward_iterable<T>::value &&
                                                                        ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:123:32:
 error: expected unqualified-id
                                !monomorphic::is_dataset<T>::value &&
                                ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:132:32:
 error: use of undeclared identifier 'is_container_forward_iterable'
 inline typename
 std::enable_if<is_container_forward_iterable<C>::value,monomorphic::collection<C>>::type
                                ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:132:62:
 error: 'C' does not refer to a value
 inline typename
 std::enable_if<is_container_forward_iterable<C>::value,monomorphic::collection<C>>::type
                                                              ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:131:19:
 note: declared here
 template<typename C>
                   ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:132:66:
 error: definition or redeclaration of 'value' cannot name the global scope
 inline typename
 std::enable_if<is_container_forward_iterable<C>::value,monomorphic::collection<C>>::type
                                                                ~~^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:132:71:
 error: a template declaration can only declare a single entity
 inline typename
 std::enable_if<is_container_forward_iterable<C>::value,monomorphic::collection<C>>::type
                                                                       ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:159:1:
 error: redefinition of 'make' as different kind of symbol
 make( std::initializer_list<T>&& );
 ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:152:1: note:
 previous definition is here
 make( char const* str );
 ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:159:12:
 error: no member named 'initializer_list' in namespace 'std'
 make( std::initializer_list<T>&& );
       ~~~~~^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:159:29:
 error: 'T' does not refer to a value
 make( std::initializer_list<T>&& );
                             ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:157:19:
 note: declared here
 template<typename T>
                   ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:159:34:
 error: expected identifier
 make( std::initializer_list<T>&& );
                                  ^
 /tmp/test-develop/include/boost/test/data/monomorphic/fwd.hpp:168:35:
 error: no template named 'declval'; did you mean 'std::declval'?
     typedef decltype( data::make( declval<DataSet>() ) ) type;
                                   ^
 /opt/clang+llvm-5.0.0-linux-
 x86_64-ubuntu16.04/bin/../include/c++/v1/type_traits:1117:1: note:
 'std::declval' declared here
 declval();
 ^
 fatal error: too many errors emitted, stopping now [-ferror-limit=]
 20 errors generated.
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13387#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-01-10 23:23:06 UTC