mirror of
https://github.com/boostorg/utility.git
synced 2025-08-03 06:44:37 +02:00
operator, on named args produce a list automatically
[SVN r2142]
This commit is contained in:
@@ -72,6 +72,12 @@ namespace test
|
|||||||
return f_impl(f_keywords()(t, name_));
|
return f_impl(f_keywords()(t, name_));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class Params>
|
||||||
|
int f_list(Params const& params)
|
||||||
|
{
|
||||||
|
return f_impl(params);
|
||||||
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
bool equal(T const& x, T const& y)
|
bool equal(T const& x, T const& y)
|
||||||
{
|
{
|
||||||
@@ -150,6 +156,12 @@ int main()
|
|||||||
test::values("foo", 666.222, 56)
|
test::values("foo", 666.222, 56)
|
||||||
, index = boost::ref(x), name = "foo"
|
, index = boost::ref(x), name = "foo"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
f_list((
|
||||||
|
tester = test::values("foo", 666.222, 56)
|
||||||
|
, index = boost::ref(x)
|
||||||
|
, name = "foo"
|
||||||
|
));
|
||||||
|
|
||||||
//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