18#ifndef LOG4CXX_OPTIONAL_HDR_
19#define LOG4CXX_OPTIONAL_HDR_
22# if __has_include(<optional>)
24# if defined(__cpp_lib_optional)
25namespace LOG4CXX_NS {
template<
class T >
using Optional = std::optional<T>; }
26#define LOG4CXX_HAS_STD_OPTIONAL 1
28# elif __has_include(<experimental/optional>)
29# include <experimental/optional>
30namespace LOG4CXX_NS {
template<
class T >
using Optional = std::experimental::optional<T>; }
31#define LOG4CXX_HAS_STD_OPTIONAL 1
32# elif __has_include(<boost/optional.hpp>)
33# include <boost/optional.hpp>
34namespace LOG4CXX_NS {
template<
class T >
using Optional = boost::optional<T>; }
35#define LOG4CXX_HAS_STD_OPTIONAL 1
37#define LOG4CXX_HAS_STD_OPTIONAL 0
41#if !LOG4CXX_HAS_STD_OPTIONAL
47 using BaseType = std::pair<bool, T>;
57 const T&
value()
const {
return this->second; }
Definition: optional.h:46
bool has_value() const
Definition: optional.h:56
Optional & operator=(const T &value)
Definition: optional.h:50
Optional()
Definition: optional.h:49
const T & value() const
Definition: optional.h:57
#define LOG4CXX_NS
Definition: log4cxx.h:104