
Daniel Earwicker <daniel.earwicker@gmail.com> writes:
On 11/3/05, David Abrahams <dave@boost-consulting.com> wrote:
Something like:
static char (& has_key(K const&) )[2];
BOOST_MPL_ASSERT_MSG( sizeof(Next::has_key(make<K>())) == 1 , duplicate_keyword, (K) );
If you could submit a patch to the current CVS along with an expected-compilation-failure test case, I'd be happy to apply it.
Excellent, thanks.
One question about the above code: is make<> already declared somewhere?
Probably a thousand places ;-)
In the meantime I've added this as a member of arg_list:
template <class T> static const T &make();
Or how about passing has_key a pointer, as NULL pointers are easy to make?
Yeah, that saves a make(). Good idea.
Apologies for my ignorance about these details.
You seem pretty knowledgeable to me :) -- Dave Abrahams Boost Consulting www.boost-consulting.com