Home | History | Annotate | Download | only in tuple.helper
      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, c++14
     11 
     12 // <tuple>
     13 
     14 // template <class T> constexpr size_t tuple_size_v = tuple_size<T>::value;
     15 
     16 // Expect failures with a reference type, pointer type, and a non-tuple type.
     17 
     18 #include <tuple>
     19 
     20 int main()
     21 {
     22     (void)std::tuple_size_v<std::tuple<> &>; // expected-note {{requested here}}
     23     (void)std::tuple_size_v<int>; // expected-note {{requested here}}
     24     (void)std::tuple_size_v<std::tuple<>*>; // expected-note {{requested here}}
     25     // expected-error@tuple:* 3 {{implicit instantiation of undefined template}}
     26 }
     27