mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Merge remote-tracking branch 'feature/boost-optional/boost-optional' into develop
This commit is contained in:
commit
53bed40bc5
|
@ -24,6 +24,8 @@
|
|||
|
||||
#if __cplusplus > 201402L
|
||||
#include <optional>
|
||||
#elif defined(SOL_USE_BOOST)
|
||||
#include <boost/optional.hpp>
|
||||
#else
|
||||
#include "../Optional/optional.hpp"
|
||||
#endif // C++ 14
|
||||
|
@ -35,6 +37,11 @@ template <typename T>
|
|||
using optional = sol::optional<T>;
|
||||
using nullopt_t = std::nullopt_t;
|
||||
constexpr nullopt_t nullopt = std::nullopt;
|
||||
#elif defined(SOL_USE_BOOST)
|
||||
template <typename T>
|
||||
using optional = boost::optional<T>;
|
||||
using nullopt_t = boost::none_t;
|
||||
const nullopt_t nullopt = boost::none;
|
||||
#else
|
||||
#endif // C++ 14
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user