diff --git a/test/named_params_test.cpp b/test/named_params_test.cpp index 10ed59d..86386c8 100755 --- a/test/named_params_test.cpp +++ b/test/named_params_test.cpp @@ -6,40 +6,36 @@ #include #include #include -#include +#include namespace test { using boost::keyword; using boost::keywords; - - struct name_t : keyword + using boost::arg; + + struct name_t { - // this should go in a wrapper type, like arg + // At some point maybe we should use has_xxx to allow this typedef boost::is_convertible predicate; - using keyword::operator=; - } name; + }; - struct value_t : keyword - { - using keyword::operator=; - } value; + keyword name; - struct index_t : keyword - { - using keyword::operator=; - } index; + struct value_t; + keyword value; - struct tester_t : keyword - { - using keyword::operator=; - } tester; + struct index_t; + keyword index; + + struct tester_t; + keyword tester; struct f_keywords // vc6 is happier with inheritance than with a typedef : keywords< tester_t - , name_t + , arg > , value_t , index_t > @@ -85,7 +81,7 @@ namespace test bool equal(char const* s1, char const* s2) { - return !std::strcmp(s1,s2); + return !strcmp(s1,s2); } template @@ -132,14 +128,10 @@ int main() test::values("foo", "bar", "baz") , "foo", "bar", "baz" ); - + f( test::values("foo", 666.222, 56) -#if BOOST_MSVC == 1200 // sadly templated operator= just doesn't work. - , index(56), name("foo") -#else , index = 56, name = "foo" -#endif ); //f(index = 56, name = 55); // won't compile