
16 Jan
2009
16 Jan
'09
6:18 p.m.
AMDG Zach wrote:
Can someone give me a high level explanation of the idea behind how concepts work? I'm trying to write a new concept class which enforces that two types are the same and it's not quite clicking. Strangely gcc has this concept built in, so I was surprised that boost didn't. I noticed a boost::is_same<> template, but it's not a concept, so it's not usable inside a BOOST_CONCEPT_ASSERT() macro.
For is_same and other boolean metafunctions you can use
an assertion, which will give a better error message anyway:
BOOST_MPL_ASSERT((boost::is_same