On 11/21/2015 09:54 PM, Raffi Enficiaud wrote:
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST static std::map
const char_type{{ {'<' , "lt"}, {'>' , "gt"}, {'&' , "amp"}, {'\'', "apos"}, {'"' , "quot"} }}; #else /.../
I would replace the std::map with a switch statement in this case. Then there is no need for an #ifndef.
http://www.boost.org/development/tests/develop/developer/output/igaztanaga-g...
and maybe because of "-Werror=sign-compare" ? or again this is hiding something else that was cut off in the report...
The problem is that if we test an unsigned integer against a literal integer value, then we a warning in the first test but not the second: unsigned int value = 1; BOOST_REQUIRE(value == 1); // No sign compare warning BOOST_REQUIRE_EQUAL(value, 1); // Sign compare warning The quick fix is for all Boost.Test users to do: BOOST_REQUIRE_EQUAL(value, 1U); but this is inconvenient if you do not know the signedness of the type, e.g. when you use a size() member function on some container.