New PP syntax, initial checkin.

[SVN r33948]
This commit is contained in:
Daniel Wallin
2006-05-06 22:00:28 +00:00
parent 310998435c
commit ae05e30eac

View File

@@ -66,6 +66,28 @@ BOOST_PARAMETER_FUNCTION((int), g, tag,
return 1;
}
BOOST_PARAMETER_FUNCTION2((int), h, tag,
(required
(tester, *)
(name, *)
)
(optional
(value, *, 1.f)
(out(index), (int), 2)
)
)
{
BOOST_MPL_ASSERT((boost::is_same<index_type, int const>));
tester(
name
, value
, index
);
return 1;
}
struct base
{
template <class Args>
@@ -190,6 +212,13 @@ int main()
, 2
);
h(
tester = values(S("foo"), 1.f, 2)
, name = S("foo")
, 1.f
, 2
);
class_ x(
tester = values(S("foo"), 1.f, 2)
, S("foo"), test::index = 2