diff --git a/tstl/include/expected.hpp b/tstl/include/expected.hpp index 21dbfd1f..592a0080 100644 --- a/tstl/include/expected.hpp +++ b/tstl/include/expected.hpp @@ -559,6 +559,10 @@ inline expected make_expected(){ return expected(); } +// Make sure the size is maintained reasonable +static_assert(sizeof(expected) == 2 * sizeof(size_t), "expected should not have overhead"); +static_assert(sizeof(expected) == 2 * sizeof(size_t), "expected should not have overhead"); + } //end of namespace std #endif