Boost logo

Boost :

From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2006-05-26 22:37:34

Ralf W. Grosse-Kunstleve wrote:
> I've reduced it to:
> template<int N>
> struct sized_type_for_promotion
> {
> typedef char (&type)[N];
> };
> sized_type_for_promotion<1> ::type promoted_index_tester(int);
> sized_type_for_promotion<2> ::type promoted_index_tester(unsigned int);
> sized_type_for_promotion<3> ::type promoted_index_tester(long);
> sized_type_for_promotion<4> ::type promoted_index_tester(unsigned long);

May be it doesn't like sized_type_for_promotion?

Could you try this approach:

char (&promoted_index_tester(int)) [1];
char (&promoted_index_tester(unsigned int)) [2];
char (&promoted_index_tester(long)) [3];
char (&promoted_index_tester(unsigned long))[4];


You only need to activate another branch of
#if !defined(BOOST_MSVC)
The patch is attached.

Alexander Nasonov
Project Manager

Boost list run by bdawes at, gregod at, cpdaniel at, john at