etaler / Etaler

A flexable HTM (Hierarchical Temporal Memory) framework with full GPU support.
BSD 3-Clause "New" or "Revised" License
89 stars 14 forks source link

Build fail on latest MSVC 2019 caused by et_check (possibe MSVC bug) #146

Closed marty1885 closed 4 years ago

marty1885 commented 4 years ago

I believe this is a compiler bug. But more debugging is needed. There's a problem with how MSVC handles macros.

The macro et_check(false, "foobar error") is expended correctly to if((false) == false) {throw EtError("foobar error")} ... by GCC and clang and older versions of MSVC. But the latest MSVC does this if((false, "foobar error") == false) {throw EtError("foobar error")} ...

This is kinda weird. Properly worth a bug report to MSVC.

marty1885 commented 4 years ago

Yeah.. this is a compiler bug and I can't find a way to workaround it. Waiting for a new MSVC release now