Boost C++ Libraries: Ticket #12378: Compilation errors with clang 3.8 https://svn.boost.org/trac10/ticket/12378 <p> Clang 3.8 without c++11 option gives compilation errors. For this clang configuration, BOOST_NO_CXX11_HDR_INITIALIZER_LIST is defined. This should be checked for using the new test api as it uses std::initialize_list. </p> <p> I've attached a proposal patch fixing the issue. </p> <p> make<a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a>: Entering directory `/work/home/phoenix/jenkins/workspace/7.4-code-analysis-clang/tools/boost/libs/test/build' Compiling unit_test_parameters.o... In file included from ../src/unit_test_parameters.cpp:16: In file included from ../../../../../tools/boost/boost/test/impl/unit_test_parameters.ipp:35: In file included from ../../../../../tools/boost/boost/test/utils/runtime/parameter.hpp:20: ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:40:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto const&amp; description = unit_test::static_constant&lt;nfp::typed_keyword&lt;cstring,struct description_t&gt;&gt;::value; <sup> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:40:105: error: a space is required between consecutive right angle brackets (use '&gt; &gt;') auto const&amp; description = unit_test::static_constant&lt;nfp::typed_keyword&lt;cstring,struct description_t&gt;&gt;::value; </sup></p> <blockquote> <p> <sup>~ </sup></p> <blockquote class="citation"> <blockquote class="citation"> </blockquote> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:41:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto const&amp; help = unit_test::static_constant&lt;nfp::typed_keyword&lt;cstring,struct help_t&gt;&gt;::value; <sup> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:41:98: error: a space is required between consecutive right angle brackets (use '&gt; &gt;') auto const&amp; help = unit_test::static_constant&lt;nfp::typed_keyword&lt;cstring,struct help_t&gt;&gt;::value; </sup></p> <blockquote> <p> <sup>~ </sup></p> <blockquote class="citation"> <blockquote class="citation"> </blockquote> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:42:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto const&amp; env_var = unit_test::static_constant&lt;nfp::typed_keyword&lt;cstring,struct env_var_t&gt;&gt;::value; <sup> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:42:101: error: a space is required between consecutive right angle brackets (use '&gt; &gt;') auto const&amp; env_var = unit_test::static_constant&lt;nfp::typed_keyword&lt;cstring,struct env_var_t&gt;&gt;::value; </sup></p> <blockquote> <p> <sup>~ </sup></p> <blockquote class="citation"> <blockquote class="citation"> </blockquote> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:43:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto const&amp; end_of_params = unit_test::static_constant&lt;nfp::typed_keyword&lt;cstring,struct end_of_params_t&gt;&gt;::value; <sup> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:43:107: error: a space is required between consecutive right angle brackets (use '&gt; &gt;') auto const&amp; end_of_params = unit_test::static_constant&lt;nfp::typed_keyword&lt;cstring,struct end_of_params_t&gt;&gt;::value; </sup></p> <blockquote> <p> <sup>~ </sup></p> <blockquote class="citation"> <blockquote class="citation"> </blockquote> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:44:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto const&amp; negation_prefix = unit_test::static_constant&lt;nfp::typed_keyword&lt;cstring,struct neg_prefix_t&gt;&gt;::value; <sup> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:44:104: error: a space is required between consecutive right angle brackets (use '&gt; &gt;') auto const&amp; negation_prefix = unit_test::static_constant&lt;nfp::typed_keyword&lt;cstring,struct neg_prefix_t&gt;&gt;::value; </sup></p> <blockquote> <p> <sup>~ </sup></p> <blockquote class="citation"> <blockquote class="citation"> </blockquote> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:45:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto const&amp; value_hint = unit_test::static_constant&lt;nfp::typed_keyword&lt;cstring,struct value_hint_t&gt;&gt;::value; <sup> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:45:104: error: a space is required between consecutive right angle brackets (use '&gt; &gt;') auto const&amp; value_hint = unit_test::static_constant&lt;nfp::typed_keyword&lt;cstring,struct value_hint_t&gt;&gt;::value; </sup></p> <blockquote> <p> <sup>~ </sup></p> <blockquote class="citation"> <blockquote class="citation"> </blockquote> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:46:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto const&amp; optional_value = unit_test::static_constant&lt;nfp::keyword&lt;struct optional_value_t&gt;&gt;::value; <sup> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:46:94: error: a space is required between consecutive right angle brackets (use '&gt; &gt;') auto const&amp; optional_value = unit_test::static_constant&lt;nfp::keyword&lt;struct optional_value_t&gt;&gt;::value; </sup></p> <blockquote> <p> <sup>~ </sup></p> <blockquote class="citation"> <blockquote class="citation"> </blockquote> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:47:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto const&amp; default_value = unit_test::static_constant&lt;nfp::keyword&lt;struct default_value_t&gt;&gt;::value; <sup> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:47:93: error: a space is required between consecutive right angle brackets (use '&gt; &gt;') auto const&amp; default_value = unit_test::static_constant&lt;nfp::keyword&lt;struct default_value_t&gt;&gt;::value; </sup></p> <blockquote> <p> <sup>~ </sup></p> <blockquote class="citation"> <blockquote class="citation"> </blockquote> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:48:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto const&amp; callback = unit_test::static_constant&lt;nfp::keyword&lt;struct callback_t&gt;&gt;::value; <sup> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:48:88: error: a space is required between consecutive right angle brackets (use '&gt; &gt;') auto const&amp; callback = unit_test::static_constant&lt;nfp::keyword&lt;struct callback_t&gt;&gt;::value; </sup></p> <blockquote> <p> <sup>~ </sup></p> <blockquote class="citation"> <blockquote class="citation"> </blockquote> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:51:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions] using enum_values = unit_test::static_constant&lt; </p> <blockquote> <p> <sup> </sup></p> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:52:27: error: no member named 'initializer_list' in namespace 'std' </p> <blockquote> <p> nfp::typed_keyword&lt;std::initializer_list&lt;std::pair&lt;const cstring,EnumType&gt;&gt;, struct enum_values_t&gt; </p> <blockquote> <p> <del></del>~<sup> </sup></p> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:52:76: error: a space is required between consecutive right angle brackets (use '&gt; &gt;') </p> <blockquote> <p> nfp::typed_keyword&lt;std::initializer_list&lt;std::pair&lt;const cstring,EnumType&gt;&gt;, struct enum_values_t&gt; </p> <blockquote> <p> <sup>~ </sup></p> <blockquote class="citation"> <blockquote class="citation"> </blockquote> </blockquote> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:52:77: error: expected '(' for function-style cast or type construction </p> <blockquote> <p> nfp::typed_keyword&lt;std::initializer_list&lt;std::pair&lt;const cstring,EnumType&gt;&gt;, struct enum_values_t&gt; </p> <blockquote> <p> <del></del><del></del><del></del><del></del><del></del><del></del><del></del><del></del>~<sup> </sup></p> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:52:78: error: expected a type </p> <blockquote> <p> nfp::typed_keyword&lt;std::initializer_list&lt;std::pair&lt;const cstring,EnumType&gt;&gt;, struct enum_values_t&gt; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/modifier.hpp:52:101: error: expected ';' after alias declaration </p> <blockquote> <p> nfp::typed_keyword&lt;std::initializer_list&lt;std::pair&lt;const cstring,EnumType&gt;&gt;, struct enum_values_t&gt; </p> <blockquote> <p> <sup> ; </sup></p> </blockquote> </blockquote> <p> In file included from ../src/unit_test_parameters.cpp:16: In file included from ../../../../../tools/boost/boost/test/impl/unit_test_parameters.ipp:35: In file included from ../../../../../tools/boost/boost/test/utils/runtime/parameter.hpp:22: ../../../../../tools/boost/boost/test/utils/runtime/argument_factory.hpp:137:69: error: use of undeclared identifier 'enum_values' </p> <blockquote> <p> std::vector&lt;std::pair&lt;cstring,EnumType&gt; &gt; const&amp; values = m[enum_values&lt;<a class="missing wiki">EnumType</a>&gt;::value]; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/argument_factory.hpp:137:81: error: '<a class="missing wiki">EnumType</a>' does not refer to a value </p> <blockquote> <p> std::vector&lt;std::pair&lt;cstring,EnumType&gt; &gt; const&amp; values = m[enum_values&lt;<a class="missing wiki">EnumType</a>&gt;::value]; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/argument_factory.hpp:127:19: note: declared here template&lt;typename <a class="missing wiki">EnumType</a>&gt; </p> <blockquote> <p> <sup> </sup></p> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/argument_factory.hpp:137:90: error: no member named 'value' in the global namespace; did you mean 'values'? </p> <blockquote> <p> std::vector&lt;std::pair&lt;cstring,EnumType&gt; &gt; const&amp; values = m[enum_values&lt;<a class="missing wiki">EnumType</a>&gt;::value]; </p> <blockquote> <p> <sup><del></del><del> values </del></sup></p> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/argument_factory.hpp:137:58: note: 'values' declared here </p> <blockquote> <p> std::vector&lt;std::pair&lt;cstring,EnumType&gt; &gt; const&amp; values = m[enum_values&lt;<a class="missing wiki">EnumType</a>&gt;::value]; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> In file included from ../src/unit_test_parameters.cpp:16: In file included from ../../../../../tools/boost/boost/test/impl/unit_test_parameters.ipp:35: ../../../../../tools/boost/boost/test/utils/runtime/parameter.hpp:256:23: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions] </p> <blockquote> <p> template&lt;typename Modifiers=nfp::no_params_type&gt; </p> <blockquote> <p> <sup> <del></del><del></del><del></del><del></del><del>~ </del></sup></p> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/parameter.hpp:302:23: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions] </p> <blockquote> <p> template&lt;typename Modifiers=nfp::no_params_type&gt; </p> <blockquote> <p> <sup> <del></del><del></del><del></del><del></del><del>~ </del></sup></p> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/parameter.hpp:368:23: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions] </p> <blockquote> <p> template&lt;typename Modifiers=nfp::no_params_type&gt; </p> <blockquote> <p> <sup> <del></del><del></del><del></del><del></del><del>~ </del></sup></p> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/parameter.hpp:377:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] </p> <blockquote> <p> auto const&amp; values = m[enum_values&lt;<a class="missing wiki">EnumType</a>&gt;::value]; <sup> </sup></p> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/parameter.hpp:377:32: error: use of undeclared identifier 'enum_values' </p> <blockquote> <p> auto const&amp; values = m[enum_values&lt;<a class="missing wiki">EnumType</a>&gt;::value]; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/parameter.hpp:377:44: error: '<a class="missing wiki">EnumType</a>' does not refer to a value </p> <blockquote> <p> auto const&amp; values = m[enum_values&lt;<a class="missing wiki">EnumType</a>&gt;::value]; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> ../../../../../tools/boost/boost/test/utils/runtime/parameter.hpp:362:19: note: declared here template&lt;typename <a class="missing wiki">EnumType</a>, args_amount a = runtime::OPTIONAL_PARAM&gt; </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12378 Trac 1.4.3 Daniel Laügt <daniel.laugt@…> Wed, 03 Aug 2016 13:15:34 GMT attachment set https://svn.boost.org/trac10/ticket/12378 https://svn.boost.org/trac10/ticket/12378 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">modifier.hpp.patch</span> </li> </ul> Ticket Daniel Laügt <daniel.laugt@…> Tue, 09 Aug 2016 17:29:53 GMT <link>https://svn.boost.org/trac10/ticket/12378#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12378#comment:1</guid> <description> <p> Pull request for the fix: <a class="ext-link" href="https://github.com/boostorg/test/pull/102"><span class="icon">​</span>https://github.com/boostorg/test/pull/102</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Sun, 04 Sep 2016 14:40:13 GMT</pubDate> <title>owner, status, milestone changed https://svn.boost.org/trac10/ticket/12378#comment:2 https://svn.boost.org/trac10/ticket/12378#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Gennadiy Rozental</span> to <span class="trac-author">Raffi Enficiaud</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.62.0</span> </li> </ul> Ticket Raffi Enficiaud Thu, 29 Sep 2016 13:43:17 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12378#comment:3 https://svn.boost.org/trac10/ticket/12378#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Released in 1.62 </p> Ticket