You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a templated parameter to the basic_any class which, if true, results of a compile-time error if the basic_any is assigned a too large object.
Example
struct Small{int x;};
struct Big{int x, y, z, w;};
auto a = boost::small_any<4, 4, true>{};
a = Small{};
a = Big{}; // static_assert(sizeof(T) <= OptimizeForSize) breaks the compilation
The text was updated successfully, but these errors were encountered:
Add a templated parameter to the basic_any class which, if true, results of a compile-time error if the basic_any is assigned a too large object.
Example
struct Small{int x;};
struct Big{int x, y, z, w;};
auto a = boost::small_any<4, 4, true>{};
a = Small{};
a = Big{}; // static_assert(sizeof(T) <= OptimizeForSize) breaks the compilation
The text was updated successfully, but these errors were encountered: