Don <> changed:

           What    |Removed                     |Added
                 CC|                            |
            Summary|template specialization not |implicit conversions don't
                   |working because of "static  |apply to template value
                   |if"?                        |parameter specialization

--- Comment #1 from Don <> 2009-09-24 07:15:54 PDT ---
Original title: 'template specialization not working because of "static if"?'

It's not because of 'static if'. This shows the same problem:

template pow10(long n){
   const long pow10=7;

template pow10(long n:0){
    const long pow10=1;

static assert(pow10!(0) == 1);

It will compile if you put
static assert(pow10!(0L) == 1);

It seems that the compiler requires template value specialisations have to
exactly match both type and value, but I don't see that in the spec anywhere.
Probably a bug. It's certainly pretty annoying.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to