8 #include <zk/config.hpp> 18 #ifndef ZKPP_OPTIONAL_USE_STD_EXPERIMENTAL 19 # define ZKPP_OPTIONAL_USE_STD_EXPERIMENTAL 0 39 #ifndef ZKPP_OPTIONAL_USE_CUSTOM 40 # define ZKPP_OPTIONAL_USE_CUSTOM 0 47 #ifndef ZKPP_OPTIONAL_USE_STD 48 # if ZKPP_OPTIONAL_USE_STD_EXPERIMENTAL || ZKPP_OPTIONAL_USE_CUSTOM 49 # define ZKPP_OPTIONAL_USE_STD 0 51 # define ZKPP_OPTIONAL_USE_STD 1 55 #if ZKPP_OPTIONAL_USE_STD 56 # define ZKPP_OPTIONAL_INCLUDE <optional> 57 # define ZKPP_OPTIONAL_TEMPLATE std::optional 58 # define ZKPP_NULLOPT_TYPE std::nullopt_t 59 # define ZKPP_NULLOPT_VALUE std::nullopt 60 #elif ZKPP_OPTIONAL_USE_STD_EXPERIMENTAL 61 # define ZKPP_OPTIONAL_INCLUDE <experimental/optional> 62 # define ZKPP_OPTIONAL_TEMPLATE std::experimental::optional 63 # define ZKPP_NULLOPT_TYPE std::experimental::nullopt_t 64 # define ZKPP_NULLOPT_VALUE std::experimental::nullopt 65 #elif ZKPP_OPTIONAL_USE_CUSTOM 66 # if !defined ZKPP_OPTIONAL_INCLUDE || !defined ZKPP_NULLOPT_TYPE || !defined ZKPP_NULLOPT_VALUE 67 # error "When ZKPP_OPTIONAL_USE_CUSTOM is set, you must also define ZKPP_OPTIONAL_INCLUDE, ZKPP_NULLOPT_TYPE, and" 68 # error "ZKPP_NULLOPT_VALUE." 71 # error "Unknown type to use for zk::optional, zk::nullopt_t, and zk::nullopt" 76 #include ZKPP_OPTIONAL_INCLUDE 86 using optional = ZKPP_OPTIONAL_TEMPLATE<T>;
#define ZKPP_NULLOPT_TYPE
The type to use for zk::nullopt_t.
#define ZKPP_NULLOPT_VALUE
The value to use for zk::nullopt.