-
Couldn't load subscription status.
- Fork 5.2k
Description
While working on the cDAC's datadescriptor infrastructure, several issues have come up that would be solved by moving coreclr to target c++17 instead of c++11 today. Most of these relate to constexpr and various relaxations in c++14 and c++17.
#118050 has faced several issues relating to getting the address of a type wrapped by the VOLATILE(T) macro as a constexpr. This is somewhat challenging because VOLATILE(T) sometimes is the volatile keyword and others a Volatile<T> wrapper class. The wrapper class overrides the built-in address-of operator &. This can be solved two different ways with features available in c++17:
std::addressofallows getting the address of an object which overrides the&operator as aconstexpr.- Allowing non-const
constexprmember functions. This would allow theVolatile<T>class to override the&operator and provide its address at compile time.
Other benefits
inline constexprvariables Remove SELECTANY usage #39532 (comment)