Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
optional.hpp
Go to the documentation of this file.
1
27#pragma once
28
29#include <optional>
30
31#include <ext/ostream>
32
33namespace ext {
34
46template< class T >
47ext::ostream & operator << ( ext::ostream & out, const std::optional < T > & optional ) {
48 if ( ! optional )
49 return out << "void";
50 else
51 return out << optional.value ( );
52}
53
54} /* namespace ext */
Definition: ostream.h:14
Definition: sigHandler.cpp:20
std::ostream & operator<<(ext::reference_wrapper< std::ostream > &os, std::ostream &(*const func)(std::ostream &))
Overloaded function allowing same operations on wrapped output stream as on the actual output stream,...
Definition: GlobalData.cpp:33