Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
alib2std
src
extensions
container
optional.hpp
Go to the documentation of this file.
1
27
#pragma once
28
29
#include <optional>
30
31
#include <ext/ostream>
32
33
namespace
ext
{
34
46
template
<
class
T >
47
ext::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 */
ext::ostream
Definition:
ostream.h:14
ext
Definition:
sigHandler.cpp:20
ext::operator<<
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
Generated on Mon Dec 27 2021 10:21:54 for Algorithms Library Toolkit by
1.9.2