Closed maoliver-amd closed 2 years ago
Great, thanks.
I understand the removal of the static_assert(false, ...)
but really surprised about the this->
being required?
Do you know why it's needed in this particular situation?
Certainly hope we're not going to have to start adding that to all member variables with future versions of C++ 😛
Its because c++20 adds some new features, one of which is named handle. So it just requires the this->
to differentiate it to the compiler. So luckily not something that has to be added to everything 😄
GFX doesnt currently compile when enabling conformance (enabled by default with C++20 ) with msvc compiler. This PR fixes that with 2 changes:
this->
added to handle to get it correctly picked up as the class member variablestd::is_void_v<TYPE>
to cause delayed instantiation of default template as otherwise the static_assert will always trigger (The choice ofis_void_v
is somewhat random as all it needs is some way to delay template evaluation and void type should never occur anyway.