Boost logo

Boost :

Subject: Re: [boost] Boost:Foreach Werror flag's problem in foreach.hpp
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-09-25 13:27:22


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.


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