Boost C++ Libraries: Ticket #11778: Cannot test C++11 "enum class" types https://svn.boost.org/trac10/ticket/11778 <p> If you use the test tools with C++11 variables of type "enum class", compilation fails with many iostream errors, mostly variations on this one: </p> <pre class="wiki">/usr/include/boost/test/tools/detail/print_helper.hpp:50:14: note: cannot convert ‘t’ (type ‘const Example’) to type ‘const std::error_code&amp;’ ostr &lt;&lt; t; </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11778 Trac 1.4.3 Adam Nielsen <a.nielsen@…> Sun, 01 Nov 2015 01:06:37 GMT attachment set https://svn.boost.org/trac10/ticket/11778 https://svn.boost.org/trac10/ticket/11778 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test.cpp</span> </li> </ul> <p> Minimal example demonstrating problem </p> Ticket Raffi Enficiaud Tue, 03 Nov 2015 13:24:14 GMT <link>https://svn.boost.org/trac10/ticket/11778#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11778#comment:1</guid> <description> <p> The problem says that the variable is not printable. Would you please confirm that using </p> <pre class="wiki">BOOST_TEST_DONT_PRINT_LOG_VALUE </pre><p> (documented <a href="http://www.boost.org/doc/libs/master/libs/test/doc/html/boost_test/utf_reference/testout_reference/test_output_macro_disable_type.html">here</a>) solves the issue? </p> <p> Thanks. </p> </description> <category>Ticket</category> </item> <item> <author>Adam Nielsen <a.nielsen@…></author> <pubDate>Tue, 03 Nov 2015 21:54:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11778#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11778#comment:2</guid> <description> <p> Yes that does work - sorry I didn't realise you had already catered for this situation! I had assumed it would be possible to simply convert the enums to ints when printing, but then enum class types can't be inherited so I imagine it's not possible to handle enum classes in a generic way like this. </p> <p> I don't suppose there's any way a static_assert or similar could be used to at least get an error message that makes it look less like a problem with the library code? </p> <p> Either way thanks for your help! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Gennadiy Rozental</dc:creator> <pubDate>Sun, 31 Jan 2016 15:12:07 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11778#comment:3 https://svn.boost.org/trac10/ticket/11778#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> In development version you'll get nicer error message about this kind of errors </p> Ticket