Boost logo

Boost Users :

Subject: Re: [Boost-users] [Test] BOOST_CHECK_EQUAL can't compare scoped enumerations
From: Merrill Cornish (merrill.cornish_at_[hidden])
Date: 2016-02-04 22:21:05


On 2/4/2016 9:03 PM, Gennadiy Rozental wrote:
> scoped enums are not printable
I've already run into that problem, so I wrote an inline function,
enum2int(), to do a static_cast to int when I have to print one. But
that aside, why does BOOST_CHECK(mUse == UsedFor::NOTIFY_INPUT); appear
to work.

Some of your documentation implies that BOOST_CHECK_EQUAL(L, R) is
equivalent to BOOST_CHECK(L == R), but it doesn't act that way, and
Eclipse's expansion of BOOST_CHECK_EQUAL() shows a lot more than L++R.

Merrill Cornish


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net