Home | History | Annotate | Download | only in tuple.elem
      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 // UNSUPPORTED: c++98, c++03, c++11
     11 
     12 #include <tuple>
     13 #include <string>
     14 #include <complex>
     15 
     16 #include <cassert>
     17 
     18 int main()
     19 {
     20 #if _LIBCPP_STD_VER > 11
     21     typedef std::complex<float> cf;
     22     auto t1 = std::make_tuple<int, std::string> ( 42, "Hi" );
     23     assert (( std::get<cf>(t1) == cf {1,2} )); // no such type
     24 #else
     25 #error
     26 #endif
     27 }
     28