Can be used with various emplace functions to allow in-place constructing a non-movable value using a callable.
More...
Can be used with various emplace functions to allow in-place constructing a non-movable value using a callable.
public:
static NonMovable Make() { return NonMovable(42); }
NonMovable(NonMovable&&) = delete;
NonMovable& operator=(NonMovable&&) = delete;
int Get() const { return value_; }
private:
explicit NonMovable(int value) : value_(value) {}
int value_;
};
std::optional<NonMovable>
opt;
}
Definition at line 20 of file lazy_prvalue.hpp.