Home | History | Annotate | Download | only in func.bind.place
      1 //===----------------------------------------------------------------------===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is dual licensed under the MIT and the University of Illinois Open
      6 // Source Licenses. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 
     10 // <functional>
     11 
     12 // placeholders
     13 
     14 #include <functional>
     15 #include <type_traits>
     16 
     17 template <class T>
     18 void
     19 test(const T& t)
     20 {
     21     // Test default constructible.
     22     T t2;
     23     ((void)t2);
     24     // Test copy constructible.
     25     T t3 = t;
     26     ((void)t3);
     27     static_assert(std::is_nothrow_copy_constructible<T>::value, "");
     28     static_assert(std::is_nothrow_move_constructible<T>::value, "");
     29 }
     30 
     31 int main()
     32 {
     33     test(std::placeholders::_1);
     34     test(std::placeholders::_2);
     35     test(std::placeholders::_3);
     36     test(std::placeholders::_4);
     37     test(std::placeholders::_5);
     38     test(std::placeholders::_6);
     39     test(std::placeholders::_7);
     40     test(std::placeholders::_8);
     41     test(std::placeholders::_9);
     42     test(std::placeholders::_10);
     43 }
     44