mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Properly directly include optional and reference it in C++17 and beyond.
This commit is contained in:
parent
bbd018c50e
commit
4f99b99ee9
|
@ -25,7 +25,7 @@
|
|||
#if __cplusplus > 201402L
|
||||
#include <optional>
|
||||
#else
|
||||
#include "Optional/optional.hpp"
|
||||
#include "../Optional/optional.hpp"
|
||||
#endif // C++ 14
|
||||
|
||||
namespace sol {
|
||||
|
@ -34,7 +34,7 @@ namespace sol {
|
|||
template <typename T>
|
||||
using optional = sol::optional<T>;
|
||||
using nullopt_t = std::nullopt_t;
|
||||
constexpr nullopt_t nullopt = std::experimental::nullopt;
|
||||
constexpr nullopt_t nullopt = std::nullopt;
|
||||
#else
|
||||
#endif // C++ 14
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user