xref: /aosp_15_r20/external/libcxx/test/std/utilities/variant/variant.synopsis/variant_npos.pass.cpp (revision 58b9f456b02922dfdb1fad8a988d5fd8765ecb80)
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10 
11 // UNSUPPORTED: c++98, c++03, c++11, c++14
12 
13 // <variant>
14 
15 // constexpr size_t variant_npos = -1;
16 
17 #include <variant>
18 
main()19 int main() {
20   static_assert(std::variant_npos == static_cast<std::size_t>(-1), "");
21 }
22