xref: /llvm-project/libcxx/test/std/utilities/variant/variant.synopsis/variant_npos.pass.cpp (revision 2df59c50688c122bbcae7467d3eaf862c3ea3088)
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // UNSUPPORTED: c++98, c++03, c++11, c++14
11 
12 // <variant>
13 
14 // constexpr size_t variant_npos = -1;
15 
16 #include <variant>
17 
18 int main(int, char**) {
19   static_assert(std::variant_npos == static_cast<std::size_t>(-1), "");
20 
21   return 0;
22 }
23