Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. //===-- None.h - Simple null value for implicit construction ------*- C++ -*-=//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. ///
  9. /// \file
  10. ///  This file provides None, an enumerator for use in implicit constructors
  11. ///  of various (usually templated) types to make such construction more
  12. ///  terse.
  13. ///
  14. //===----------------------------------------------------------------------===//
  15.  
  16. #ifndef LLVM_ADT_NONE_H
  17. #define LLVM_ADT_NONE_H
  18.  
  19. #include "llvm/Support/Compiler.h"
  20. #include <optional>
  21.  
  22. namespace llvm {
  23. /// A simple null object to allow implicit construction of std::optional<T>
  24. /// and similar types without having to spell out the specialization's name.
  25. LLVM_DEPRECATED("Use std::nullopt_t instead", "std::nullopt_t")
  26. typedef std::nullopt_t NoneType;
  27. LLVM_DEPRECATED("Use std::nullopt instead.", "std::nullopt")
  28. inline constexpr std::nullopt_t None = std::nullopt;
  29. }
  30.  
  31. #endif
  32.