template parameters not deducible in partial specialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

i have a base template class like this:

template<uint8_t num, typename T> class A { ... }

and I want to place the implementation differences in specialized templates 
like this:

template<uint8_t num, typename T> class A<0, uint8_t> { ... }
template<uint8_t num, typename T> class A<1, uint16_t> { ... }
template<uint8_t num, typename T> class A<2, uint8_t> { ... }

I use compiler from trunk compiled for target avr and I get the error:

sample.h:291:15: error: template parameters not deducible in partial 
specialization:
         class A<0, uint8_t>
               ^~~~~~~~~~~~~~~~~
sample.h:291:15: note:         'num'
sample.h:291:15: note:         'T'


I read that template with different integer values should work, so what's my 
fault?


best regards

Reinhard



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux