entt: Error when compiling with MSVC

@skypjack Hello,

I am trying to integrate Entt’s ECS on top of an existing DX12 Rendering engine. When I try to compile my code, I am getting an error.

1>D:\users\source\repos\DX12Engine\include\entt\core\type_info.hpp(60,30): error C2131: expression did not evaluate to a constant 1>D:\users\source\repos\DX12Engine\include\entt\core\hashed_string.hpp(77,13): message : a non-constant (sub-)expression was encountered

Any suggestions on why I might be running into this issue?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

Thanks for reporting @shadowndacorner this will help other users for sure! 👍

I just ran into this issue on a project I’m working on after adding the /permissive- flag. Removing the flag allows the code to compile.

My understanding is that new projects created in Visual Studio have that flag by default, but generated projects from utilities like CMake, premake, etc don’t, so it seems likely to me that the flag is causing this issue and creating the inconsistency between your environment and @gamehacker1999’s.