Bug report - IC++ 7.1 for Windows

Bug report - IC++ 7.1 for Windows

Hi,

I don't know whether there is specific section for reporting bugs, so I decided to post it here in case someone can redirect it to the proper channel. AFAIK this has not been reported before (made extensive googling).

BUG: IC++ 7.1 does not properly support pointers to members as non-type template arguments.

ENVIRONMENT: IC++ 7.1 for Windows on top of MSVC++ 6.0 SP5.

CODE SHOWING THE BUG:
#include
#include

using namespace std;

template
struct member:std::unary_function
{
const Type& operator()(const Class&x)const
{
return x.*PtrToMember;
}

Type& operator()(Class &x)const
{
return x.*PtrToMember;
}
};

typedef std::pair pair_of_ints;

int main()
{
pair_of_ints p(0,1);
int i=member()(p);
int j=member()(p);

cout< return 0;
}

The code returns 1,1 when it should have returned 0,1.

Hope this helps. If someone knows of a (freely accessible) more appropriate place to post this, please let me know.

Regards,

Joaqun M Lpez Muoz
Telefnica, Investigacin y Desarrollo

1 contenuto / 0 nuovi
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione