[Boost-bugs] [Boost C++ Libraries] #12228: Some test headers fail to compile independently

Subject: [Boost-bugs] [Boost C++ Libraries] #12228: Some test headers fail to compile independently
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-25 18:20:47


#12228: Some test headers fail to compile independently
----------------------------------------+---------------------
 Reporter: Tony Lewis <tonyelewis@…> | Owner: rogeeff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
  Version: Boost 1.61.0 | Severity: Problem
 Keywords: header,compile,test,policy |
----------------------------------------+---------------------
 The Boost header policy requires:

> Make sure that a translation unit consisting of just the contents of the
 header file will compile successfully.

 ...but quite a few of the test headers to not meet this standard, eg:

 {{{
 clang++ -std=c++11 -stdlib=libc++ -isystem serialization/include -isystem
 /opt/include -x c++ -c -o /tmp/a.o
 test/include/boost/test/data/test_case.hpp
 In file included from test/include/boost/test/data/test_case.hpp:17:
 In file included from /opt/include/boost/test/data/dataset.hpp:16:
 In file included from /opt/include/boost/test/data/monomorphic.hpp:19:
 /opt/include/boost/test/data/monomorphic/generate.hpp:88:64: error: no
 member named 'ref' in namespace 'boost'; did you mean 'std::ref'?
     iterator begin() const { return iterator(
 boost::ref(const_cast<Generator&>(m_generator)) ); }
                                                                ^~~~~~~
 /usr/include/c++/v1/__functional_base:462:1: note: 'std::ref' declared
 here
 ref(_Tp& __t) _NOEXCEPT
 ^
 In file included from test/include/boost/test/data/test_case.hpp:17:
 In file included from /opt/include/boost/test/data/dataset.hpp:16:
 In file included from /opt/include/boost/test/data/monomorphic.hpp:21:
 /opt/include/boost/test/data/monomorphic/grid.hpp:137:57: error: no
 template named 'identity' in namespace 'boost::mpl'; did you mean
 'move_detail::identity'?
 result_of::grid<mpl::identity<DataSet1>,mpl::identity<DataSet2>>
                                                         ^~~~~
 /opt/include/boost/move/detail/meta_utils.hpp:217:8: note:
 'move_detail::identity' declared here
 struct identity
        ^
 In file included from test/include/boost/test/data/test_case.hpp:17:
 In file included from /opt/include/boost/test/data/dataset.hpp:16:
 In file included from /opt/include/boost/test/data/monomorphic.hpp:21:
 /opt/include/boost/test/data/monomorphic/grid.hpp:137:81: error: no
 template named 'identity' in namespace 'boost::mpl'; did you mean
 'move_detail::identity'?
 result_of::grid<mpl::identity<DataSet1>,mpl::identity<DataSet2>>
 ^~~~~
 /opt/include/boost/move/detail/meta_utils.hpp:217:8: note:
 'move_detail::identity' declared here
 struct identity
        ^
 In file included from test/include/boost/test/data/test_case.hpp:17:
 In file included from /opt/include/boost/test/data/dataset.hpp:16:
 In file included from /opt/include/boost/test/data/monomorphic.hpp:21:
 /opt/include/boost/test/data/monomorphic/grid.hpp:151:57: error: no
 template named 'identity' in namespace 'boost::mpl'; did you mean
 'move_detail::identity'?
 result_of::grid<mpl::identity<DataSet1>,data::result_of::make<DataSet2>>
                                                         ^~~~~
 /opt/include/boost/move/detail/meta_utils.hpp:217:8: note:
 'move_detail::identity' declared here
 struct identity
        ^
 In file included from test/include/boost/test/data/test_case.hpp:17:
 In file included from /opt/include/boost/test/data/dataset.hpp:16:
 In file included from /opt/include/boost/test/data/monomorphic.hpp:21:
 /opt/include/boost/test/data/monomorphic/grid.hpp:163:89: error: no
 template named 'identity' in namespace 'boost::mpl'; did you mean
 'move_detail::identity'?
 result_of::grid<data::result_of::make<DataSet1>,mpl::identity<DataSet2>>
 ^~~~~
 /opt/include/boost/move/detail/meta_utils.hpp:217:8: note:
 'move_detail::identity' declared here
 struct identity
        ^
 In file included from test/include/boost/test/data/test_case.hpp:17:
 In file included from /opt/include/boost/test/data/dataset.hpp:16:
 In file included from /opt/include/boost/test/data/monomorphic.hpp:22:
 /opt/include/boost/test/data/monomorphic/join.hpp:111:57: error: no
 template named 'identity' in namespace 'boost::mpl'; did you mean
 'move_detail::identity'?
 result_of::join<mpl::identity<DataSet1>,mpl::identity<DataSet2>>
                                                         ^~~~~
 /opt/include/boost/move/detail/meta_utils.hpp:217:8: note:
 'move_detail::identity' declared here
 struct identity
        ^
 In file included from test/include/boost/test/data/test_case.hpp:17:
 In file included from /opt/include/boost/test/data/dataset.hpp:16:
 In file included from /opt/include/boost/test/data/monomorphic.hpp:22:
 /opt/include/boost/test/data/monomorphic/join.hpp:111:81: error: no
 template named 'identity' in namespace 'boost::mpl'; did you mean
 'move_detail::identity'?
 result_of::join<mpl::identity<DataSet1>,mpl::identity<DataSet2>>
 ^~~~~
 /opt/include/boost/move/detail/meta_utils.hpp:217:8: note:
 'move_detail::identity' declared here
 struct identity
        ^
 In file included from test/include/boost/test/data/test_case.hpp:17:
 In file included from /opt/include/boost/test/data/dataset.hpp:16:
 In file included from /opt/include/boost/test/data/monomorphic.hpp:22:
 /opt/include/boost/test/data/monomorphic/join.hpp:122:57: error: no
 template named 'identity' in namespace 'boost::mpl'; did you mean
 'move_detail::identity'?
 result_of::join<mpl::identity<DataSet1>,data::result_of::make<DataSet2>>
                                                         ^~~~~
 /opt/include/boost/move/detail/meta_utils.hpp:217:8: note:
 'move_detail::identity' declared here
 struct identity
        ^
 In file included from test/include/boost/test/data/test_case.hpp:17:
 In file included from /opt/include/boost/test/data/dataset.hpp:16:
 In file included from /opt/include/boost/test/data/monomorphic.hpp:22:
 /opt/include/boost/test/data/monomorphic/join.hpp:133:89: error: no
 template named 'identity' in namespace 'boost::mpl'; did you mean
 'move_detail::identity'?
 result_of::join<data::result_of::make<DataSet1>,mpl::identity<DataSet2>>
 ^~~~~
 /opt/include/boost/move/detail/meta_utils.hpp:217:8: note:
 'move_detail::identity' declared here
 struct identity
        ^
 In file included from test/include/boost/test/data/test_case.hpp:17:
 In file included from /opt/include/boost/test/data/dataset.hpp:16:
 In file included from /opt/include/boost/test/data/monomorphic.hpp:24:
 /opt/include/boost/test/data/monomorphic/zip.hpp:151:56: error: no
 template named 'identity' in namespace 'boost::mpl'; did you mean
 'move_detail::identity'?
 result_of::zip<mpl::identity<DataSet1>,mpl::identity<DataSet2>>
                                                        ^~~~~
 /opt/include/boost/move/detail/meta_utils.hpp:217:8: note:
 'move_detail::identity' declared here
 struct identity
        ^
 In file included from test/include/boost/test/data/test_case.hpp:17:
 In file included from /opt/include/boost/test/data/dataset.hpp:16:
 In file included from /opt/include/boost/test/data/monomorphic.hpp:24:
 /opt/include/boost/test/data/monomorphic/zip.hpp:151:80: error: no
 template named 'identity' in namespace 'boost::mpl'; did you mean
 'move_detail::identity'?
 result_of::zip<mpl::identity<DataSet1>,mpl::identity<DataSet2>>
 ^~~~~
 /opt/include/boost/move/detail/meta_utils.hpp:217:8: note:
 'move_detail::identity' declared here
 struct identity
        ^
 In file included from test/include/boost/test/data/test_case.hpp:17:
 In file included from /opt/include/boost/test/data/dataset.hpp:16:
 In file included from /opt/include/boost/test/data/monomorphic.hpp:24:
 /opt/include/boost/test/data/monomorphic/zip.hpp:165:56: error: no
 template named 'identity' in namespace 'boost::mpl'; did you mean
 'move_detail::identity'?
 result_of::zip<mpl::identity<DataSet1>,data::result_of::make<DataSet2>>
                                                        ^~~~~
 /opt/include/boost/move/detail/meta_utils.hpp:217:8: note:
 'move_detail::identity' declared here
 struct identity
        ^
 In file included from test/include/boost/test/data/test_case.hpp:17:
 In file included from /opt/include/boost/test/data/dataset.hpp:16:
 In file included from /opt/include/boost/test/data/monomorphic.hpp:24:
 /opt/include/boost/test/data/monomorphic/zip.hpp:177:88: error: no
 template named 'identity' in namespace 'boost::mpl'; did you mean
 'move_detail::identity'?
 result_of::zip<data::result_of::make<DataSet1>,mpl::identity<DataSet2>>
 ^~~~~
 /opt/include/boost/move/detail/meta_utils.hpp:217:8: note:
 'move_detail::identity' declared here
 struct identity
        ^
 test/include/boost/test/data/test_case.hpp:119:30: error: expected class
 name
 class test_case_gen : public test_unit_generator {
                              ^
 test/include/boost/test/data/test_case.hpp:140:13: error: unknown type
 name 'test_unit'; did you mean 'test_unit_id'?
     virtual test_unit* next() const
             ^~~~~~~~~
             test_unit_id
 /opt/include/boost/test/detail/global_typedef.hpp:53:25: note:
 'test_unit_id' declared here
 typedef unsigned long test_unit_id;
                         ^
 test/include/boost/test/data/test_case.hpp:182:18: error: no type named
 'list' in namespace 'std'
     mutable std::list<test_unit*> m_test_cases;
             ~~~~~^
 test/include/boost/test/data/test_case.hpp:182:22: error: expected member
 name or ';' after declaration specifiers
     mutable std::list<test_unit*> m_test_cases;
     ~~~~~~~~~~~~~~~~~^
 test/include/boost/test/data/test_case.hpp:124:29: error: no member named
 'normalize_test_case_name' in namespace 'boost::unit_test::ut_detail'
     : m_tc_name( ut_detail::normalize_test_case_name( tc_name ) )
                  ~~~~~~~~~~~^
 test/include/boost/test/data/test_case.hpp:130:7: error: member
 initializer 'm_test_cases' does not name a non-static data member or base
 class
     , m_test_cases( std::move(gen.m_test_cases) )
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 fatal error: too many errors emitted, stopping now [-ferror-limit=]
 20 errors generated.
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12228>
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 : 2017-02-16 18:50:20 UTC