variant_npos.pass.cpp 577 B

123456789101112131415161718192021
  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. // UNSUPPORTED: c++98, c++03, c++11, c++14
  11. // <variant>
  12. // constexpr size_t variant_npos = -1;
  13. #include <variant>
  14. int main() {
  15. static_assert(std::variant_npos == static_cast<std::size_t>(-1), "");
  16. }