ORIGINAL
Loading...
Searching...
No Matches
original::Printable Concept Reference

Requires type to support output stream insertion. More...

#include <types.h>

Concept definition

template<typename TYPE>
concept original::Printable = requires(std::ostream& os, const TYPE& t) {
{ os << t } -> std::same_as<std::ostream&>;
}
Requires type to support output stream insertion.
Definition types.h:114

Detailed Description

Requires type to support output stream insertion.

Template Parameters
TYPEThe type to check.

Ensures the type can be written to std::ostream using the << operator.

static_assert(Printable<int>); // Succeeds
struct NoOutput {};
static_assert(!Printable<NoOutput>); // Fails