Like it, thanks, one question however related to the PT type alias, why do you use std::remove_reference_t alongside with remove_reference_t? If I'm correct, remove_cvref_t removes both const, volatile AND reference qualifiers. Isn't that redundant?
Yes, it is redundant! Thanks for pointing that out. My original example was C++17 code, where we don't have remove_cvref_t. I decided to update the example for the recording to use C++20 and overlooked the redundancy. Nonetheless, I would use the alias PT to shorten the longish std::remove_cvref_t in the following code. Andreas
Nice !!
Like it, thanks, one question however related to the PT type alias, why do you use std::remove_reference_t alongside with remove_reference_t? If I'm correct, remove_cvref_t removes both const, volatile AND reference qualifiers. Isn't that redundant?
I was wondering about it as well.
Yes, it is redundant! Thanks for pointing that out. My original example was C++17 code, where we don't have remove_cvref_t. I decided to update the example for the recording to use C++20 and overlooked the redundancy. Nonetheless, I would use the alias PT to shorten the longish std::remove_cvref_t in the following code.
Andreas