|
|
|
|
|
by jcelerier
1118 days ago
|
|
> Forgive me, but can you be clearer than "mentioned"? Is the mangling required to contain template parameters for return types? The mangling will contain template parameters, as you can have: foo.hpp template<typename T>
T f();
foo.cpp template<>
int f<int>() { return 123; }
template<>
float f<float>() { return 123; }
bar.cpp std::cout << f<int>();
and the right function has to be found. demo: https://gcc.godbolt.org/z/rMjYoEzaK |
|
So in the example several layers above, T uniquely identifies the function. I don't see any need to involve std::integral_constant<int, x> in the mangling.