TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
variant_extensions.hpp
#include <nda/stdutil/array.hpp>
#include <sstream>
#include <string>
#include <variant>
#include <vector>

Detailed Description

Small helpers for working with std::variant types.

Definition in file variant_extensions.hpp.

Go to the source code of this file.

Classes

struct  triqs::utility::overloaded< Fs >
 Lambda-overload helper for std::visit. More...

Functions

template<typename T, typename... Ts>
std::ostream & std::operator<< (std::ostream &os, std::variant< T, Ts... > const &v)
 Write a std::variant to an output stream by visiting the held alternative and forwarding it to the stream.
template<typename T, typename... Ts>
std::ostream & std::operator<< (std::ostream &os, std::vector< std::variant< T, Ts... > > const &vec)
 Write a vector of std::variant as a comma-separated list of its elements.
string std::to_string (string const &str)
 Identity overload for std::string.
template<typename T, typename... Ts>
string std::to_string (variant< T, Ts... > const &var)
 Convert a variant into a string.