Ticket #3114: parameter_test.cpp

File parameter_test.cpp, 534 bytes (added by Jeremiah Willcock, 13 years ago)

Test using new interface

Line 
1#include <boost/parameter/name.hpp>
2#include <boost/parameter/binding.hpp>
3
4BOOST_PARAMETER_NAME(my_param)
5
6template <typename T> struct s {};
7
8struct bogus {
9 typedef void boost_parameter_use_template_call;
10 template <typename U> struct result: public s<U> {};
11 template <typename Arg>
12 typename result<bogus(Arg)>::type
13 operator()(Arg) const {return 0;}
14};
15
16template <typename ArgPack>
17void f(const ArgPack& ap) {
18 const char* cs = ap[_my_param || bogus()];
19}
20
21int main(int, char**) {
22 f(_my_param = "param");
23 return 0;
24}