Lets imagine that we want to create alias for customization point object, like std::ranges::advance
.
Is there a good way to do this with minimal overhead?
The following code fails in MSVC because it requires deleted copy constructor:
static constexpr auto advance_my = std::ranges::advance
The following code works in all 3 compilers (MSVC, LLVM, GCC) – Godbolt. But is this the best we can do?
static constexpr auto& advance_my = std::ranges::advance
Or should we just wrap standard function with perfect forwarding wrapper that has our special name?