Open shangjiaxuan opened 2 years ago
Ugh, yeah I’ve run into this problem several times in other projects. I’ll get it fixed and make an appveyor script for CI on windows
Located the position to be from the tbb
include lines using static_assert
s. WIN32_LEAN_AND_MEAN
doesn't work, but NOMINMAX
works.
Describe the bug Building Geant4 version on windows imports
min
max
macros fromwindows.h
when using2021.6.0
version oftbb
on visual studio16.11.1
, which breaks code inPTL
that usesstd::min
andstd::max
(e.g. inThreadPool.hh
line468
in functionvoid ThreadPool::execute_on_all_threads(FuncT&& _func)
).To Reproduce Description contains reproduction details.
Expected behavior Normal compilation.
Screenshots non
Putting this block (or NOMINMAX) somewhere in the code should solve the problem. Still locating the include location.