Opened 6 years ago
Closed 5 years ago
#12228 closed Bugs (fixed)
Some test headers fail to compile independently
Reported by: | Owned by: | Raffi Enficiaud | |
---|---|---|---|
Milestone: | Boost 1.65.0 | Component: | test |
Version: | Boost 1.61.0 | Severity: | Problem |
Keywords: | header, compile, test, policy | Cc: |
Description
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.
Change History (4)
comment:1 by , 6 years ago
comment:2 by , 5 years ago
Milestone: | To Be Determined → Boost 1.65.0 |
---|
comment:3 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
In master, rev 3ddb0e0d29e8ebfe4ba20921a3d366f7b5b837b2
Note:
See TracTickets
for help on using tickets.
Boost Header policy is here: http://www.boost.org/development/header.html