Using concepts to differentiate which template function to call - is it allowed?
I have two template functions that:
* have the same name
* have different type for the first nontype template argument
* both have a second type argument, deduced from the regular argument, with a different constraint. The constraint fully differentiate between allowed types (there is no overlap)
When I call the function, the compiler is unable to differentiate the functions based on the nontype template argument. I expect it to then use the constraint of the second template argument to figure out which function should be used.
If the above description is too vague, here is a concrete, minimal example:
[https://godbolt.org/z/Koc89coWY](https://godbolt.org/z/Koc89coWY)
gcc and clang are able to figure it out. MSVC is not.
But is it actually expected from the compiler? Or am I relying on some extra capability of gcc/clang?
If it is the former, is there a way to make MSVC work with it, while keeping the same function name?
https://redd.it/1ompyhp
@r_cpp
Post #24167
18