Ambiguous call to overloaded function

using visual2015, if I set the "Whole Program Optimisation" option to "Always disable link time code generation", I got the following error :

z:\sdks\juce\modules\juce_core\memory/juce_Atomic.h(278): error C2668: '_InterlockedDecrement' : ambiguous call to overloaded function

I'm fine with setting it too "link-time code generation when possible", but I'm curious about that. any idea why this happens?

No idea.. Maybe you're including some windows headers in two different files with different options?

yes, seems it was due to some namespace mess.

By the way, there's a small warning in juce_win32_Threads.cpp Thread::launchThread() l112

conversion of threadStackSize from size_t to unsigned int :

threadHandle = (void*) _beginthreadex (0, threadStackSize, &threadEntryProc, this, 0, &newThreadId);

That's odd, that line of code must have been there for 10 years without anyone noticing a warning before! But thanks, easy to rectify.