Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

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

  1. //===- Optional.h - Simple variant for passing optional values --*- 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 Optional, a template class modeled in the spirit of
  11. ///  OCaml's 'opt' variant.  The idea is to strongly type whether or not
  12. ///  a value can be optional.
  13. ///
  14. //===----------------------------------------------------------------------===//
  15.  
  16. #ifndef LLVM_ADT_OPTIONAL_H
  17. #define LLVM_ADT_OPTIONAL_H
  18.  
  19. #include <optional>
  20.  
  21. namespace llvm {
  22. // Legacy alias of llvm::Optional to std::optional.
  23. // FIXME: Remove this after LLVM 16.
  24. template <class T> using Optional = std::optional<T>;
  25. } // namespace llvm
  26.  
  27. #endif // LLVM_ADT_OPTIONAL_H
  28.