diff --git a/src/lib/opaque-holder.hpp b/src/lib/opaque-holder.hpp index 8a8e7433c..bf484e817 100644 --- a/src/lib/opaque-holder.hpp +++ b/src/lib/opaque-holder.hpp @@ -74,7 +74,6 @@ #include #include -#include namespace lib { @@ -192,7 +191,7 @@ namespace lib { /** - * Inline buffer holding and owning an object while concealing the + * Inline buffer to hold and own an object while concealing the * concrete type. The object is given either as ctor parameter or * by direct assignment; it is copy-constructed into the buffer. * It is necessary to specify the required buffer storage space @@ -207,6 +206,7 @@ namespace lib { * @note assertion failure when trying to place an instance not * fitting into given size. * @note \em not threadsafe! + * @todo add support for moving of rvalue refs */ template < size_t siz ///< maximum storage required for the targets to be held inline @@ -252,12 +252,12 @@ namespace lib { }; - /** concrete subclass managing a specific kind of contained object. + /** concrete subclass to manage a specific kind of contained object. * @note invariant: #content_ always contains a valid SUB object */ template struct Buff : Buffer { - BOOST_STATIC_ASSERT (siz >= sizeof(SUB)); + static_assert (siz >= sizeof(SUB), "InPlaceAnyHolder: insufficient Buffer size"); SUB& get() const ///< core operation: target is contained within the inline buffer @@ -513,7 +513,7 @@ namespace lib { /** - * Inline buffer holding and owning an object while concealing the + * Inline buffer to hold and own an object while concealing the * concrete type. Access to the contained object is similar to a * smart-pointer, but the object isn't heap allocated. OpaqueHolder * may be created empty, which can be checked by a bool test. @@ -620,7 +620,7 @@ namespace lib { void placeDefault() { - BOOST_STATIC_ASSERT (siz >= sizeof(DEFAULT)); + static_assert (siz >= sizeof(DEFAULT), "InPlaceBuffer to small"); new(&buf_) DEFAULT(); } @@ -649,7 +649,7 @@ namespace lib { destroy(); \ try \ { \ - BOOST_STATIC_ASSERT (siz >= sizeof(TY));\ + static_assert (siz >= sizeof(TY), "InPlaceBuffer to small");\ \ return *new(&buf_) _CTOR_CALL_; \ } \ diff --git a/src/lib/variant.hpp b/src/lib/variant.hpp index 1880b1689..bf37d1224 100644 --- a/src/lib/variant.hpp +++ b/src/lib/variant.hpp @@ -27,7 +27,7 @@ ** doesn't deal with alignment issues and is not threadsafe. ** ** Values can be stored using \c operator= . In order to access the value - ** stored in lib::Variant, you additionally need to define a "functor" + ** stored in lib::Variant, you additionally need to define an access "functor" ** - with a typedef "Ret" for the return type ** - providing a `static Ret access(ELM&)` function ** for each of the types used in the Variant