libcxx

libcxx mirror with random patches
git clone https://git.neptards.moe/neptards/libcxx.git
Log | Files | Refs

TupleFunction.pass.cpp (654B)


      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 // This is for bugs 18853 and 19118
     11 
     12 #include "test_macros.h"
     13 
     14 #if TEST_STD_VER >= 11
     15 
     16 #include <tuple>
     17 #include <functional>
     18 
     19 struct X
     20 {
     21     X() {}
     22 
     23     template <class T>
     24     X(T);
     25 
     26     void operator()() {}
     27 };
     28 
     29 int main()
     30 {
     31     X x;
     32     std::function<void()> f(x);
     33 }
     34 #else
     35 int main () {}
     36 #endif