1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
template <typename T_bnr, typename T> T_bnr PackBNR(T val, T scale, unsigned short num_bit, bool sign_bit) {
return T_bnr(); // invalid
}
template <char, typename T> T_bnr PackBNR(T val, T scale, unsigned short num_bit, bool sign_bit) {
// copy/paste the code that works
}
template <signed char, typename T> T_bnr PackBNR(T val, T scale, unsigned short num_bit, bool sign_bit) {
// copy/paste the code that works
}
template <unsigned char, typename T> T_bnr PackBNR(T val, T scale, unsigned short num_bit, bool sign_bit) {
// copy/paste the code that works
}
template <int, typename T> T_bnr PackBNR(T val, T scale, unsigned short num_bit, bool sign_bit) {
// copy/paste the code that works
}
// etc.
|