CortidQCT  1.2.2.52
Optional.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include <ostream>
16 
17 #if __has_include(<optional>)
18 # include <optional>
19 #elif __has_include(<experimental/optional>)
20 # include <experimental/optional>
21 
22 namespace std {
23 using std::experimental::nullopt;
24 using std::experimental::nullopt_t;
25 using std::experimental::optional;
26 
27 using std::experimental::make_optional;
28 
29 template <class T>
30 std::ostream &operator<<(std::ostream &os, optional<T> const &opt) {
31  return opt ? (os << *opt) : (os << "nullopt");
32 }
33 
34 } // namespace std
35 
36 #else
37 # error C++ Standard libary has no optional type
38 #endif
Definition: ColorToLabelMap.h:27