mirror of
https://github.com/marzer/tomlplusplus.git
synced 2024-11-05 02:28:54 +00:00
516b8e2096
also: - removed `TOML_LARGE_FILES` - removed unnecessary template machinery (esp. where ostreams were involved) - made all overloaded operators 'hidden friends' - documentation fixes - version bump - this will form the foundation of v3
33 lines
870 B
C++
33 lines
870 B
C++
//# This file is a part of toml++ and is subject to the the terms of the MIT license.
|
|
//# Copyright (c) Mark Gillard <mark.gillard@outlook.com.au>
|
|
//# See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text.
|
|
// SPDX-License-Identifier: MIT
|
|
#pragma once
|
|
|
|
#include "preprocessor.h"
|
|
TOML_DISABLE_WARNINGS;
|
|
#if !TOML_HAS_CUSTOM_OPTIONAL_TYPE
|
|
#include <optional>
|
|
#endif
|
|
TOML_ENABLE_WARNINGS;
|
|
|
|
TOML_NAMESPACE_START
|
|
{
|
|
#if TOML_HAS_CUSTOM_OPTIONAL_TYPE
|
|
|
|
template <typename T>
|
|
using optional = TOML_OPTIONAL_TYPE<T>;
|
|
|
|
#else
|
|
|
|
/// \brief The 'optional' type used throughout the library.
|
|
///
|
|
/// \remarks By default this will be an alias for std::optional, but you can change the optional type
|
|
/// used by the library by defining #TOML_OPTIONAL_TYPE.
|
|
template <typename T>
|
|
using optional = std::optional<T>;
|
|
|
|
#endif
|
|
}
|
|
TOML_NAMESPACE_END;
|