================ @@ -0,0 +1,79 @@ +//===- UnsignedOrNone.h - simple optional index-----*- 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 +// +//===----------------------------------------------------------------------===// +// +/// \file +/// Defines clang::UnsignedOrNone. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_BASIC_UNSIGNED_OR_NONE_H +#define LLVM_CLANG_BASIC_UNSIGNED_OR_NONE_H + +#include <cassert> +#include <llvm/ADT/STLForwardCompat.h> +#include <optional> + +namespace clang { + +template <class T> struct SmallOptional { ---------------- erichkeane wrote:
Looking below, we should probably use `has_value` like std::optional here, instead of `operator bool`. ALSO: why should this live in the FE instead of in STLExtras? https://github.com/llvm/llvm-project/pull/191828 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
