Properly directly include optional and reference it in C++17 and beyond.

This commit is contained in:
ThePhD 2016-03-24 15:51:04 -04:00
parent bbd018c50e
commit 4f99b99ee9

View File

@ -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
}