|
Boost : |
Subject: [boost] [core] Breaking bugfix in scoped enums
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2014-06-06 18:41:44
Hi,
While creating tests for scoped enums emulation I've fixed a bug which
resulted in the enums being convertible to int. This is a potentially breaking
change, the code like this will now not compile:
BOOST_SCOPED_ENUM_DECLARE_BEGIN(color)
{
red, green, blue
}
BOOST_SCOPED_ENUM_DECLARE_END(color)
void foo(boost::native_type<color>::type col);
color col = color::blue;
foo(col);
The call to foo() should be done like this:
foo(boost::native_value(col));
Previously, the conversion was implicit.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk