diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-04-05 16:39:24 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-04-05 16:39:24 +0200 |
commit | fa98d8a5965d47aa9c55050ebec6e4977c5c1738 (patch) | |
tree | 24fd3e489d884cee826c1a9e019a4caad5868b4c /src | |
parent | e1b46c3fed098e400ff532178808037f07245604 (diff) |
fix std::is_base_of confusion
Diffstat (limited to 'src')
-rw-r--r-- | src/world.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/world.hpp b/src/world.hpp index c3369dd3..28701394 100644 --- a/src/world.hpp +++ b/src/world.hpp @@ -117,7 +117,7 @@ public: template<typename T> std::shared_ptr<T> world::find_object(object_id id) { - static_assert(std::is_same_v<object, T> || std::is_base_of_v<object, T>); + static_assert(std::is_base_of_v<object, T>); // make it a dependent name so that including "src/object.hpp" isn't needed using U = std::conditional_t<std::is_same_v<T, object>, T, object>; if (std::shared_ptr<U> ptr = find_object_(id); !ptr) |