Subject: Re: [boost] [locale] review
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-04-16 18:48:26
On 04/16/2011 03:02 PM, Phil Endecott wrote:
> In my own iconv wrapper code I need a const_cast because the POSIX spec
> misses a const on the second argument to iconv(); some platforms correct
> this, but not all:
> #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
> || defined(__sun__)
> // Previously __APPLE__ was included in this list; presumably they have
> // changed their headers. If you have an older system you may need to put
> // it back.
> #define ICONV_ARG2_IS_CONST
> This doesn't seem to be done here.
Actually, the library handles it in a smarter
way: it uses overload resolution to detect
the type of ::iconv and adds the cast if needed.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk