[boost-mpl] -Wall -Werror issue

Hi, This code generates sign / unsigned compare warning with -Wall, could this please be cleaned up? enum { n = # if defined(__EDG_VERSION__) aux::dependent_unsigned<T>::value > -1 # else sizeof(T) > -1 # endif }; It appears that sizeof(T) > -1 yields zero for EDG, Gcc and Clang so perhaps this is just older (unused) code? -- Noel Belcourt

On 27/11/12 00:55, Belcourt, Kenneth wrote:
Hi,
This code generates sign / unsigned compare warning with -Wall, could this please be cleaned up?
enum { n = # if defined(__EDG_VERSION__) aux::dependent_unsigned<T>::value > -1 # else sizeof(T) > -1 # endif };
It appears that sizeof(T) > -1 yields zero for EDG, Gcc and Clang so perhaps this is just older (unused) code?
The code in question is in print.hpp Its purpose is to emit warnings.

On Nov 26, 2012, at 5:22 PM, Mathias Gaunard wrote:
On 27/11/12 00:55, Belcourt, Kenneth wrote:
Hi,
This code generates sign / unsigned compare warning with -Wall, could this please be cleaned up?
enum { n = # if defined(__EDG_VERSION__) aux::dependent_unsigned<T>::value > -1 # else sizeof(T) > -1 # endif };
It appears that sizeof(T) > -1 yields zero for EDG, Gcc and Clang so perhaps this is just older (unused) code?
The code in question is in print.hpp Its purpose is to emit warnings.
Good to know it's successfully achieved it's objective. Our project need to compile -Wall -Werror and we want to use Boost, can this be done without local modifications to the Boost installation?

On 27/11/12 01:38, Belcourt, Kenneth wrote:
On Nov 26, 2012, at 5:22 PM, Mathias Gaunard wrote:
On 27/11/12 00:55, Belcourt, Kenneth wrote:
Hi,
This code generates sign / unsigned compare warning with -Wall, could this please be cleaned up?
enum { n = # if defined(__EDG_VERSION__) aux::dependent_unsigned<T>::value > -1 # else sizeof(T) > -1 # endif };
It appears that sizeof(T) > -1 yields zero for EDG, Gcc and Clang so perhaps this is just older (unused) code?
The code in question is in print.hpp Its purpose is to emit warnings.
Good to know it's successfully achieved it's objective. Our project need to compile -Wall -Werror and we want to use Boost, can this be done without local modifications to the Boost installation?
print is a debugging tool, used to print messages at compile-time using warnings. If you don't want to emit such warnings, just don't use it.

On Nov 26, 2012, at 5:47 PM, Mathias Gaunard wrote:
On 27/11/12 01:38, Belcourt, Kenneth wrote:
On Nov 26, 2012, at 5:22 PM, Mathias Gaunard wrote:
On 27/11/12 00:55, Belcourt, Kenneth wrote:
Hi,
This code generates sign / unsigned compare warning with -Wall, could this please be cleaned up?
enum { n = # if defined(__EDG_VERSION__) aux::dependent_unsigned<T>::value > -1 # else sizeof(T) > -1 # endif };
It appears that sizeof(T) > -1 yields zero for EDG, Gcc and Clang so perhaps this is just older (unused) code?
The code in question is in print.hpp Its purpose is to emit warnings.
Good to know it's successfully achieved it's objective. Our project need to compile -Wall -Werror and we want to use Boost, can this be done without local modifications to the Boost installation?
print is a debugging tool, used to print messages at compile-time using warnings.
Ah, that's what I need to know, thanks Mathias.
If you don't want to emit such warnings, just don't use it.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
Belcourt, Kenneth
-
Mathias Gaunard