// -*- C++ -*- //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03, c++11, c++14 // // template struct variant_size; // undefined // template struct variant_size; // template struct variant_size; // template struct variant_size; // template constexpr size_t variant_size_v // = variant_size::value; #include #include #include template void test() { static_assert(std::variant_size::value == E, ""); static_assert(std::variant_size::value == E, ""); static_assert(std::variant_size::value == E, ""); static_assert(std::variant_size::value == E, ""); static_assert(std::variant_size_v == E, ""); static_assert(std::variant_size_v == E, ""); static_assert(std::variant_size_v == E, ""); static_assert(std::variant_size_v == E, ""); static_assert(std::is_base_of, std::variant_size>::value, ""); }; int main() { test, 0>(); test, 1>(); test, 4>(); }