zookeeper-cpp
ZooKeeper Client for C++
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups
optional.hpp File Reference

Controls the import of the optional and nullopt_t types, as well as the nullopt constexpr. More...

#include <zk/config.hpp>

Go to the source code of this file.

Macros

#define ZKPP_OPTIONAL_USE_STD_EXPERIMENTAL   0
 Set this to 1 to use std::experimental::optional, std::experimental::nullopt_t, and std::experimental::nullopt as the backing types for zk::optional, zk::nullopt_t, and zk::nullopt. More...
 
#define ZKPP_OPTIONAL_USE_CUSTOM   0
 Set this to 1 to use custom definitions for zk::optional, zk::nullopt_t, and zk::nullopt. More...
 
#define ZKPP_OPTIONAL_USE_STD   1
 Set this to 1 to use std::optional, std::nullopt_t, and std::nullopt as the backing types for zk::optional, zk::nullopt_t, and zk::nullopt. More...
 
#define ZKPP_OPTIONAL_INCLUDE   <optional>
 The file to include to get the implementation for optional, nullopt_t, and nullopt. More...
 
#define ZKPP_OPTIONAL_TEMPLATE   std::optional
 The template to use for zk::optional. More...
 
#define ZKPP_NULLOPT_TYPE   std::nullopt_t
 The type to use for zk::nullopt_t. More...
 
#define ZKPP_NULLOPT_VALUE   std::nullopt
 The value to use for zk::nullopt. More...
 

Typedefs

template<typename T >
using zk::optional = ZKPP_OPTIONAL_TEMPLATE< T >
 
using zk::nullopt_t = ZKPP_NULLOPT_TYPE
 

Detailed Description

Controls the import of the optional and nullopt_t types, as well as the nullopt constexpr.

These are probably std::optional, std::nullopt_t, and std::nullopt, respectively, but can be your custom types (as long as they behave in a manner similar enough to std::optional, std::nullopt_t, and std::nullopt).

Definition in file optional.hpp.