Brian Silverman | ce4aa8d | 2018-08-04 23:36:03 -0700 | [diff] [blame^] | 1 | // |
| 2 | // arg_copy_test.cpp - copying a custom placeholder _1 to arg<1> |
| 3 | // |
| 4 | // Copyright 2016 Peter Dimov |
| 5 | // |
| 6 | // Distributed under the Boost Software License, Version 1.0. |
| 7 | // See accompanying file LICENSE_1_0.txt or copy at |
| 8 | // http://www.boost.org/LICENSE_1_0.txt |
| 9 | // |
| 10 | |
| 11 | #include <boost/is_placeholder.hpp> |
| 12 | #include <boost/bind/arg.hpp> |
| 13 | |
| 14 | // |
| 15 | |
| 16 | template<int I> struct ph |
| 17 | { |
| 18 | }; |
| 19 | |
| 20 | namespace boost |
| 21 | { |
| 22 | |
| 23 | template<int I> struct is_placeholder< ::ph<I> > |
| 24 | { |
| 25 | enum _vt { value = I }; |
| 26 | }; |
| 27 | |
| 28 | } // namespace boost |
| 29 | |
| 30 | int main() |
| 31 | { |
| 32 | boost::arg<1> a1 = ph<1>(); |
| 33 | (void)a1; |
| 34 | } |