Index: boost/parameter/aux_/arg_list.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/parameter/aux_/arg_list.hpp,v retrieving revision 1.10 diff -u -r1.10 arg_list.hpp --- boost/parameter/aux_/arg_list.hpp 24 Oct 2005 17:41:23 -0000 1.10 +++ boost/parameter/aux_/arg_list.hpp 13 Nov 2005 00:28:18 -0000 @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -65,6 +66,10 @@ }; }; + // Terminator for has_key, indicating that the keyword is unique + template + static char (& has_key(Unique_keyword const *) )[1]; + #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || (BOOST_WORKAROUND(__GNUC__, < 3)) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) @@ -182,6 +187,16 @@ }; }; + // Overload for key_type, so the assert below will fire if the + // same keyword is used again + static char (& has_key(key_type const *) )[2]; + using Next::has_key; + + BOOST_MPL_ASSERT_MSG( + sizeof(Next::has_key(static_cast(0))) == 1, + duplicate_keyword, (key_type) + ); + // // Begin implementation of indexing operators for looking up // specific arguments by name