xref: /llvm-project/libcxx/test/std/utilities/variant/variant.synopsis/variant_npos.pass.cpp (revision d4b59a05fc7507cf69993109443dc5af47ae4fa8)
180e66ac1SEric Fiselier //===----------------------------------------------------------------------===//
280e66ac1SEric Fiselier //
357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
680e66ac1SEric Fiselier //
780e66ac1SEric Fiselier //===----------------------------------------------------------------------===//
880e66ac1SEric Fiselier 
9*31cbe0f2SLouis Dionne // UNSUPPORTED: c++03, c++11, c++14
1080e66ac1SEric Fiselier 
1180e66ac1SEric Fiselier // <variant>
1280e66ac1SEric Fiselier 
1380e66ac1SEric Fiselier // constexpr size_t variant_npos = -1;
1480e66ac1SEric Fiselier 
1580e66ac1SEric Fiselier #include <variant>
1680e66ac1SEric Fiselier 
177fc6a556SMarshall Clow #include "test_macros.h"
187fc6a556SMarshall Clow 
main(int,char **)192df59c50SJF Bastien int main(int, char**) {
2080e66ac1SEric Fiselier   static_assert(std::variant_npos == static_cast<std::size_t>(-1), "");
212df59c50SJF Bastien 
222df59c50SJF Bastien   return 0;
2380e66ac1SEric Fiselier }
24