FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_concept::StreamInsertable Concept Reference

Concept for types that support stream insertion (operator<<) More...

#include <concept.hpp>

Concept definition

template<typename T>
concept ns_concept::StreamInsertable = requires(T t, std::ostream& os)
{
{ os << t } -> std::same_as<std::ostream&>;
}
Concept for types that support stream insertion (operator<<)
Definition concept.hpp:417

Detailed Description

Concept for types that support stream insertion (operator<<)

Template Parameters
TThe type to check

Types satisfying this concept can be written to std::ostream.

Example:

template<StreamInsertable T>
void print(const T& value) { std::cout << value; }

Definition at line 417 of file concept.hpp.