storage: backward compatibility on component requirements
This commit is contained in:
@@ -675,7 +675,7 @@ public:
|
||||
*/
|
||||
template<typename... Args>
|
||||
value_type &emplace(const entity_type entt, Args &&...args) {
|
||||
if constexpr(sizeof...(Args) != 0u && std::is_aggregate_v<value_type>) {
|
||||
if constexpr(std::is_aggregate_v<value_type> && (sizeof...(Args) != 0u || !std::is_default_constructible_v<value_type>)) {
|
||||
const auto it = emplace_element(entt, false, Type{std::forward<Args>(args)...});
|
||||
return element_at(static_cast<size_type>(it.index()));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user