I'm using a class literal template that's basically defined as:
struct A {
public:
const std::size_t size1, size2, size3;
}
I've made an instance of this with
constexpr A AInst = {1, 2, 1};
I then have a templated function that uses a size from the literal:
template<A a>
static void func(int arg1, double (*arg2)[a.size1]);
When I go to specialize this function I just get: "Internal compiler error." (using MSVC)
template<>
static void func<AInst>(int arg1, double (*arg2)[AInst.size1]){ /* implementation */}
question from:
https://stackoverflow.com/questions/65839797/compiler-error-with-function-template-specialization 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…