Commit c295d419 authored by Dominik Charousset's avatar Dominik Charousset

Add `invalid_stream` for initializing stream<T>

parent ba2382d6
......@@ -25,6 +25,8 @@
namespace caf {
struct invalid_stream_t {};
/// Identifies an unbound sequence of messages.
template <class T>
class stream {
......@@ -39,6 +41,10 @@ public:
// nop
}
stream(invalid_stream_t) {
// nop
}
inline const stream_id& id() const {
return id_;
}
......@@ -52,6 +58,8 @@ private:
stream_id id_;
};
constexpr invalid_stream_t invalid_stream = invalid_stream_t{};
} // namespace caf
#endif // CAF_STREAM_HPP
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