1249259Sdim//===-- None.h - Simple null value for implicit construction ------*- C++ -*-=//
2249259Sdim//
3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4353358Sdim// See https://llvm.org/LICENSE.txt for license information.
5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6249259Sdim//
7249259Sdim//===----------------------------------------------------------------------===//
8249259Sdim//
9249259Sdim//  This file provides None, an enumerator for use in implicit constructors
10249259Sdim//  of various (usually templated) types to make such construction more
11249259Sdim//  terse.
12249259Sdim//
13249259Sdim//===----------------------------------------------------------------------===//
14249259Sdim
15249259Sdim#ifndef LLVM_ADT_NONE_H
16249259Sdim#define LLVM_ADT_NONE_H
17249259Sdim
18249259Sdimnamespace llvm {
19341825Sdim/// A simple null object to allow implicit construction of Optional<T>
20249259Sdim/// and similar types without having to spell out the specialization's name.
21321369Sdim// (constant value 1 in an attempt to workaround MSVC build issue... )
22321369Sdimenum class NoneType { None = 1 };
23321369Sdimconst NoneType None = NoneType::None;
24249259Sdim}
25249259Sdim
26249259Sdim#endif
27