siplasplas
A library for C++ reflection and introspection
cpp::concepts::IStreamable< T, typename > Class Template Reference

Checks whether a vaue of type T can be read from a standard stream. More...

#include <siplasplas/typeerasure/concepts/iostream.hpp>

Inheritance diagram for cpp::concepts::IStreamable< T, typename >:
cpp::concepts::Concept< false >

Additional Inherited Members

- Static Public Attributes inherited from cpp::concepts::Concept< false >
static constexpr bool no_except
 

Detailed Description

template<typename T, typename = void>
class cpp::concepts::IStreamable< T, typename >

Checks whether a vaue of type T can be read from a standard stream.

This concept trait checks if values of a given type T can be read from a stream class using operator>>(std:istream&, T).

Template Parameters
TType to check.
Returns
True if the type T has a operator>>(std::istream&, T) overload declared in this translation unit. False otherwise.
#include <siplasplas/typeerasure/concepts/iostream.hpp>
#include <vector>
#include <string>
using namespace cpp::concepts;
static_assert(!IStreamable<std::vector<int>>(), "vector is not istreamable by default");
static_assert( IStreamable<std::string>(), "string is istreamable");

The documentation for this class was generated from the following file: