wjakob / tbb

Intel TBB with CMake build system
Apache License 2.0
369 stars 161 forks source link

C++17 Compiling Error in Visual Studio 2019 #63

Closed KIKI007 closed 4 years ago

KIKI007 commented 4 years ago

Hi Wenzel,

We use your latest tbb and try to compile it on Windows with the C++17 standard. It has compilation error:

C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared\rpcndr.h(192): error C2872: 'byte': ambiguous symbol C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared\rpcndr.h(191): note: could be 'unsigned char byte' ....

When turning back to C++11, the TBB works perfectly. Also, on mac, both C++ 11 and C++ 17 standard is supported by tbb.

The reason I want to use C++17 is that your new nanogui (https://github.com/mitsuba-renderer/nanogui) requires C++17. I am not sure whether we can mix the different C++ standards in the same project?

Best Ziqi Wang

jschueller commented 4 years ago

Can you give it a try with tbb files from 2020.2 ?