oneTBB icon indicating copy to clipboard operation
oneTBB copied to clipboard

Is is intended behavior to have min max defined?

Open shangjiaxuan opened this issue 2 years ago • 4 comments

Including tbb.h and global_control.h will pull in min max preprocessors from windows headers. This will occlude std::min and std::max usage in later code, and needs #undef. Is the preprocessors intended behavior? (Some downstream libraries breaks compilation on windows because of this.)

shangjiaxuan avatar May 19 '22 18:05 shangjiaxuan

Related: https://github.com/jrmadsen/PTL/issues/32 Related: https://github.com/oneapi-src/oneTBB/pull/603

shangjiaxuan avatar May 19 '22 18:05 shangjiaxuan

Although not in included directly, enumerable_thread_specific.h seems to contain a #include <windows.h> not guarded by NOMINMAX, locations of the winapi header that contributed to this issue is unknown.

shangjiaxuan avatar May 19 '22 18:05 shangjiaxuan

See previous issue and PR: https://github.com/oneapi-src/oneTBB/issues/573 https://github.com/oneapi-src/oneTBB/pull/576

phprus avatar May 19 '22 19:05 phprus

So, closed. Please reopen if the issue remains.

Alexandr-Konovalov avatar Feb 29 '24 10:02 Alexandr-Konovalov