Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
std_optional.hpp
Go to the documentation of this file.
1// # This file is a part of toml++ and is subject to the the terms of the MIT license.
2// # Copyright (c) Mark Gillard <mark.gillard@outlook.com.au>
3// # See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text.
4// SPDX-License-Identifier: MIT
5#pragma once
6
7#include "preprocessor.hpp"
9#if !TOML_HAS_CUSTOM_OPTIONAL_TYPE
10#include <optional>
11#endif
13
15#if TOML_HAS_CUSTOM_OPTIONAL_TYPE
16
17 template <typename T>
18 using optional = TOML_OPTIONAL_TYPE<T>;
19
20#else
21
26 template <typename T>
27 using optional = std::optional<T>;
28
29#endif
30}
TOML_NAMESPACE_START
TOML_ENABLE_WARNINGS
TOML_DISABLE_WARNINGS
TOML_NAMESPACE_END