-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed as duplicate of#112419
Labels
needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownersAn area label is needed to ensure this gets routed to the appropriate area ownersruntime-coreclrspecific to the CoreCLR runtimespecific to the CoreCLR runtime
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::addressof
allows getting the address of an object which overrides the&
operator as aconstexpr
.- Allowing non-const
constexpr
member functions. This would allow theVolatile<T>
class to override the&
operator and provide its address at compile time.
Other benefits
inline constexpr
variables Remove SELECTANY usage #39532 (comment)
Metadata
Metadata
Assignees
Labels
needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownersAn area label is needed to ensure this gets routed to the appropriate area ownersruntime-coreclrspecific to the CoreCLR runtimespecific to the CoreCLR runtime