simplifications, renaming, clarifications

[SVN r1700]
This commit is contained in:
Dave Abrahams
2003-10-23 21:52:05 +00:00
parent ab2251b85c
commit a99e88d6d5

View File

@@ -15,7 +15,7 @@ using boost::keywords;
struct name_t : keyword<name_t> struct name_t : keyword<name_t>
{ {
// this should go in a wrapper type, like arg<keyword, predicate> // this should go in a wrapper type, like arg<keyword, predicate>
typedef boost::is_convertible<boost::mpl::_1, const char*> predicate_type; typedef boost::is_convertible<boost::mpl::_1, const char*> predicate;
using keyword<name_t>::operator=; using keyword<name_t>::operator=;
} name; } name;
@@ -71,6 +71,7 @@ int f(const Name& name_,
} }
struct Foo { operator const char*() const { return "foo"; } };
int main() int main()
{ {
using test::f; using test::f;
@@ -82,7 +83,7 @@ int main()
#if BOOST_MSVC == 1200 // sadly templated operator= just doesn't work. #if BOOST_MSVC == 1200 // sadly templated operator= just doesn't work.
f(index(56), name("foo")); f(index(56), name("foo"));
#else #else
f(index = 56, name = "foo"); f(index = 56, name = Foo());
#endif #endif
//f(index = 56, name = 55); // won't compile //f(index = 56, name = 55); // won't compile
return 0; return 0;