Compiler: MSVC19 with C++ 17 features.
Basic code to get this error:
void render(entt::registry& registry) {
auto view = registry.view<Sprite, Material>();
}
Error occur on line 427 of storage.hpp.
Thank you for your help.
Found the problem I use a reference inside one of my component. Sorry for the trouble.
@skypjack You could put some static_asserts in assure to ensure that components are move-constructible and all that. Then you get a clear error message in one place instead of cryptic error messages all over the place.
@Kerndog73 actually the requirement is move constructible and move assignable.
I'd rather put the static assert within the storage class.
By “and all that”, I meant move-assignable 😅. It makes a lot more sense in the storage class actually.
Most helpful comment
@skypjack You could put some static_asserts in assure to ensure that components are move-constructible and all that. Then you get a clear error message in one place instead of cryptic error messages all over the place.