llvm/clang/include/clang/Basic/CustomizableOptional.h

//===- CustomizableOptional.h - Optional with custom storage ----*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef CLANG_BASIC_CUSTOMIZABLEOPTIONAL_H
#define CLANG_BASIC_CUSTOMIZABLEOPTIONAL_H

#include "llvm/ADT/Hashing.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/type_traits.h"
#include <cassert>
#include <new>
#include <optional>
#include <utility>

namespace clang {

namespace optional_detail {
template <typename> class OptionalStorage;
} // namespace optional_detail

// Optional type which internal storage can be specialized by providing
// OptionalStorage. The interface follows std::optional.
template <typename T> class CustomizableOptional {};

template <typename T>
CustomizableOptional(const T &) -> CustomizableOptional<T>;

template <class T>
llvm::hash_code hash_value(const CustomizableOptional<T> &O) {}

template <typename T, typename U>
constexpr bool operator==(const CustomizableOptional<T> &X,
                          const CustomizableOptional<U> &Y) {}

template <typename T, typename U>
constexpr bool operator!=(const CustomizableOptional<T> &X,
                          const CustomizableOptional<U> &Y) {}

template <typename T, typename U>
constexpr bool operator<(const CustomizableOptional<T> &X,
                         const CustomizableOptional<U> &Y) {}

template <typename T, typename U>
constexpr bool operator<=(const CustomizableOptional<T> &X,
                          const CustomizableOptional<U> &Y) {}

template <typename T, typename U>
constexpr bool operator>(const CustomizableOptional<T> &X,
                         const CustomizableOptional<U> &Y) {}

template <typename T, typename U>
constexpr bool operator>=(const CustomizableOptional<T> &X,
                          const CustomizableOptional<U> &Y) {}

template <typename T>
constexpr bool operator==(const CustomizableOptional<T> &X, std::nullopt_t) {}

template <typename T>
constexpr bool operator==(std::nullopt_t, const CustomizableOptional<T> &X) {}

template <typename T>
constexpr bool operator!=(const CustomizableOptional<T> &X, std::nullopt_t) {}

template <typename T>
constexpr bool operator!=(std::nullopt_t, const CustomizableOptional<T> &X) {}

template <typename T>
constexpr bool operator<(const CustomizableOptional<T> &, std::nullopt_t) {}

template <typename T>
constexpr bool operator<(std::nullopt_t, const CustomizableOptional<T> &X) {}

template <typename T>
constexpr bool operator<=(const CustomizableOptional<T> &X, std::nullopt_t) {}

template <typename T>
constexpr bool operator<=(std::nullopt_t, const CustomizableOptional<T> &X) {}

template <typename T>
constexpr bool operator>(const CustomizableOptional<T> &X, std::nullopt_t) {}

template <typename T>
constexpr bool operator>(std::nullopt_t, const CustomizableOptional<T> &X) {}

template <typename T>
constexpr bool operator>=(const CustomizableOptional<T> &X, std::nullopt_t) {}

template <typename T>
constexpr bool operator>=(std::nullopt_t, const CustomizableOptional<T> &X) {}

template <typename T>
constexpr bool operator==(const CustomizableOptional<T> &X, const T &Y) {}

template <typename T>
constexpr bool operator==(const T &X, const CustomizableOptional<T> &Y) {}

template <typename T>
constexpr bool operator!=(const CustomizableOptional<T> &X, const T &Y) {}

template <typename T>
constexpr bool operator!=(const T &X, const CustomizableOptional<T> &Y) {}

template <typename T>
constexpr bool operator<(const CustomizableOptional<T> &X, const T &Y) {}

template <typename T>
constexpr bool operator<(const T &X, const CustomizableOptional<T> &Y) {}

template <typename T>
constexpr bool operator<=(const CustomizableOptional<T> &X, const T &Y) {}

template <typename T>
constexpr bool operator<=(const T &X, const CustomizableOptional<T> &Y) {}

template <typename T>
constexpr bool operator>(const CustomizableOptional<T> &X, const T &Y) {}

template <typename T>
constexpr bool operator>(const T &X, const CustomizableOptional<T> &Y) {}

template <typename T>
constexpr bool operator>=(const CustomizableOptional<T> &X, const T &Y) {}

template <typename T>
constexpr bool operator>=(const T &X, const CustomizableOptional<T> &Y) {}

} // namespace clang

#endif // CLANG_BASIC_CUSTOMIZABLEOPTIONAL_H