私に機能があれば
int calcStuff_dynamic(const int a, const int b)
およびいくつかのテンプレート メタ コード
template<int a, int b>
struct calcStuff_static {
static const int value = //some more code
};
ラッパーを書く方法はありますか
int calcStuff(const int a, const int b) {
IF_THESE_ARE_KNOWN_CONSTANTS_AT_COMPILE_TIME(a, b)
return calcStuff_static<a, b>::value;
ELSE_TEMPLATE_WOULD_FAIL
return calcStuff_dynamic(a, b);
}