I seem to have found something that clang and gcc disagree on. Here's the code:This successfully compiles with gcc 7.4.0 but fails with clang 7.0.0 with this error message:
I get these errors from GCC:Pre-decrement and post-decrement operators cause similar errors. No such errors with Clang. Any ideas what could be wrong or how to work around this?
I wrote a lightweight 'string_view' wrapper for a C++14 project, and with MSVC 2017 it is triggering a static_assert at compile-time, yet the same code at run-time is passes the regular assert. My question is, is this a compiler bug, manifest undefined behaviour, or something else entirely?
I am attempting to use a 64-bits integral as a bitmap, and acquire/release ownership of individual bits, atomically.