forked from boostorg/utility
simplifications, renaming, clarifications
[SVN r1700]
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user