Boost logo

Boost :

Subject: Re: [boost] Boost:Foreach Werror flag's problem in foreach.hpp
From: Eric Niebler (eric_at_[hidden])
Date: 2012-09-25 14:22:43


On 9/25/2012 10:27 AM, Mathias Gaunard wrote:
> On 09/25/2012 06:22 AM, GAURAV GUPTA wrote:
>> Hi ,
>>
>> While using Boost (ver 1.51.0) file "foreach.hpp" I am getting following
>> errors:
>>
>> Boost/1.51/Inc/boost/foreach.hpp:454:5: error: cast from 'char*' to
>> 'std::vector<std::pair<std::basic_string<char>, std::basic_string<char> >
>>> *' increases required alignment of target type [-Werror=cast-align]
>> cc1plus: all warnings being treated as errors
>>
>> I need to use "Werror" flag in my application.
>>
>> Any solution for this problem?
>
> Since the code in question is a workaround for Borland, it might be a
> good idea to replace the code with *t on non-Borland compilers.

<nod> Fixed on trunk. https://svn.boost.org/trac/boost/changeset/80702

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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