Boost logo

Boost :

Subject: Re: [boost] [type traits extension] test for const volatile& as returntype
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2011-07-06 06:17:22


> No idea, but if you have a test case I'm able to file bug reports to Intel.

Thank you, because I have not been able to find the place where to file a bug...

The following code fails to compile with icpc 12.0.4 20110427.
The error is: initial value of reference to const volatile must be an lvalue
I think it should choose g(...) instead of g(const volatile int&) and
there should be no error then.
This works fine if the argument is of type int& or volatile int&.

Regards, Frédéric

#include <iostream>
void g(const volatile int&) { std::cout<<"g(T)\n"; }
void g(...) { std::cout<<"g(...)\n"; }
int main() {
       int i(0);
       g(i--);
       return 0;
}


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk