tracy icon indicating copy to clipboard operation
tracy copied to clipboard

Expression did not evaluate to a constant

Open night2876 opened this issue 10 months ago • 3 comments

bool GraphicsManager::renderWorldShader() {		

	ZoneScopedN("render");

	if (QueueMan.isQueueEmpty(kQueueVisibleWorldObject))
		return false;

	if (!RenderMan.isAmbientSet()) {
		return false;
	}

Hi i'm using the last release of Visual Studio 2022 Community Edition, i'm using C++ (17) and VcPkg to add Tracy to my project but when add ZoneScopedN the compiler said

C2131 expression did not evaluate to a constant

Someone could help please ?

night2876 avatar Mar 29 '25 16:03 night2876

I guess your compiler is broken then. Is VS2022CE a recent version? Try updating if not.

mcourteaux avatar Apr 03 '25 13:04 mcourteaux

It's the edit and continue crap most likely.

wolfpld avatar Apr 03 '25 13:04 wolfpld

Note that this can be fixed as done here https://github.com/wolfpld/tracy/blob/073df4ed42149443ccab40b44fdf12e09057c2f4/public/tracy/Tracy.hpp#L16

@GabrielSiliceum Can you extract the changes to their own PR as the symbol resolution one may take a while to complete ?

Lectem avatar Apr 09 '25 20:04 Lectem

I think this can be closed since https://github.com/wolfpld/tracy/pull/1022 has been merged

Lectem avatar May 23 '25 23:05 Lectem