Commit 3b243eb8 authored by Dominik Charousset's avatar Dominik Charousset

Add value_type member type to stream

parent 283daeb7
......@@ -34,6 +34,12 @@ struct invalid_stream_t {};
template <class T>
class stream {
public:
// -- member types -----------------------------------------------------------
using value_type = T;
// -- constructors and destructors -------------------------------------------
stream() = default;
stream(stream&&) = default;
stream(const stream&) = default;
......@@ -64,6 +70,8 @@ public:
// nop
}
// -- accessors --------------------------------------------------------------
/// Returns the unique identifier for this stream.
inline const stream_id& id() const {
return id_;
......@@ -74,12 +82,16 @@ public:
return ptr_;
}
// -- serialization support --------------------------------------------------
template <class Inspector>
friend typename Inspector::result_type inspect(Inspector& f, stream& x) {
return f(meta::type_name("stream"), x.id_);
}
private:
// -- member variables -------------------------------------------------------
stream_id id_;
stream_handler_ptr ptr_;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment