Boost logo

Boost :

Subject: Re: [boost] [warnings] Are warnings acceptable artifactsfrom builds?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-09-08 21:57:18


AMDG

Thomas Klimpel wrote:
> Michael Fawcett wrote:
>
>> You can
>> either ignore the warning or put it in a template specialization which
>> would get rid of the warning. Is it defined in the standard that the
>> conditional will *always* get optimized away? If it isn't, that seems
>> like a reasonable warning.
>>
>
> MSVC explicitly says whether a warning is just a performance warning, and C4127 is not a performance warning. It is a warning to inform the programmer about a possible mistake (IIRC, if(true) or if(false) don't trigger this warning).

But while(true) does trigger it. (which is really annoying.)

>> I don't think that works with templates. Typically to silence errors
>> in template code, the user must put those pragmas around the point of
>> instantiation.
>>
>
> I hope you're joking.
>

For msvc, warnings need to be suppressed around the point of definition.

In Christ,
Steven Watanabe


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