diff --git a/CMakeLists.txt b/CMakeLists.txt index fd8c05f..41c8a67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.5) include(cmake/color.cmake) -set(BLT_VERSION 0.15.3) +set(BLT_VERSION 0.15.4) set(BLT_TEST_VERSION 0.0.1) set(BLT_TARGET BLT) diff --git a/include/blt/std/any.h b/include/blt/std/any.h index 851ce03..7ec4c83 100644 --- a/include/blt/std/any.h +++ b/include/blt/std/any.h @@ -168,15 +168,14 @@ namespace blt::unsafe {} template - buffer_any_t& set(const T& t) + void set(const T& t) const { static_assert(std::is_trivially_copyable_v && "Type must be trivially copyable"); std::memcpy(_data, &t, sizeof(t)); - return *this; } template - T any_cast() + T any_cast() const { static_assert(std::is_trivially_copyable_v && "Type must be trivially copyable"); T t;