Classes | Namespaces | Functions | Variables
optional.h File Reference

Container to hold optional data. More...

#include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include "./base.h"
#include "./common.h"
#include "./logging.h"
#include "./type_traits.h"
Include dependency graph for optional.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  dmlc::nullopt_t
 dummy type for assign null to optional More...
class  dmlc::optional< T >
 c++17 compatible optional class. More...
struct  std::hash< dmlc::optional< T > >
 std hash function for optional More...


 namespace for dmlc


template<typename T >
std::ostream & dmlc::operator<< (std::ostream &os, const optional< T > &t)
 serialize an optional object to string. More...
template<typename T >
std::istream & dmlc::operator>> (std::istream &is, optional< T > &t)
 parse a string object into optional<T> More...
std::istream & dmlc::operator>> (std::istream &is, optional< bool > &t)
 specialization of '>>' istream parsing for optional<bool> More...
 dmlc::DMLC_DECLARE_TYPE_NAME (optional< int >,"int or None")
 description for optional int More...
 dmlc::DMLC_DECLARE_TYPE_NAME (optional< bool >,"boolean or None")
 description for optional bool More...
 dmlc::DMLC_DECLARE_TYPE_NAME (optional< float >,"float or None")
 description for optional float More...
 dmlc::DMLC_DECLARE_TYPE_NAME (optional< double >,"double or None")
 description for optional double More...


constexpr const nullopt_t dmlc::nullopt = nullopt_t(0)

Detailed Description

Container to hold optional data.

Copyright (c) 2016 by Contributors