|
Boost Users : |
Subject: [Boost-users] [mpl] BOOST_MPL_ASSERT_MSG for static_assert
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2014-07-23 09:04:55
Hello,
I would like to add some diagnostic messages during compile time,
potentially enumerating one or more types as well.
static_assert is great for simple messages but falls a bit short due
to inability to list types and such.
I wonder if BOOST_MPL_ASSERT_MSG is the right answer, however, I am
getting the following errors:
BOOST_MPL_ASSERT_MSG(
std::is_base_of<xnode, Node>::value
, "requested type is not a node"
, (types<node_type>)
);
1>i:\source\kingdom software\cppxml\xml\domain\parts\xnode.h(111):
warning C4002: too many actual parameters for macro
'BOOST_MPL_ASSERT_MSG'
It's an error message, but not the one(s) I am expecting. Do I need to
enable something, preprocessor definition, something like that?
Best regards,
Michael Powell
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