Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Adapter wrapper to treat non-assignable values as if they were assignable.
Prerequisite is for the type to be copy constructible (maybe even just move constructible). The typical usage is when we want to take a snapshot from some value, but do not actually need the ability to assign something to a specific object instance. In such a situation, we may just destroy a previous snapshot and then place a new copy initialised value into the same storage space. For all really assignable types we fall back to a trivial implementation.
Definition in file replaceable-item.hpp.
#include "lib/error.hpp"
#include "lib/null-value.hpp"
#include "lib/meta/util.hpp"
#include "lib/util.hpp"
#include <type_traits>
#include <utility>
#include <cstddef>
Classes | |
struct | is_assignable_value< X > |
class | ReplaceableItem< X, COND > |
Adapter container to take snapshots from non-assignable values. More... | |
class | ReplaceableItem< X, meta::enable_if< is_assignable_value< X > > > |
simple delegating implementation to use for regular cases More... | |
class | ReplaceableItem< X, meta::enable_if< std::is_reference< X > > > |
disallow embedding references More... | |
Namespaces | |
lib | |
Implementation namespace for support and library code. | |