Subject: Re: [boost] construe_cast, call for interest and feedback
From: Richard Hazlewood (boost_at_[hidden])
Date: 2010-10-11 04:34:47


Jeroen Habraken <vexocide <at> gmail.com> writes:

>
> On 7 October 2010 22:59, Matthew Herrmann <matthew.herrmann <at> zomojo.com>
wrote:
> > Also are you adding array of char as an input specialization? I like the
way it avoids the strlen for const
> char literals on the rhs.
>
> Yes I am, the specific specializations can be found at
>
http://github.com/VeXocide/construe_cast/blob/master/boost/construe/iterable.hp
p
> lines 120 to 165

The fixed-size array-of-char specializations seem like a good idea, but (the
user) can fall into the same trap as the (v3) filesystem constructor does
(trac #4640), e.g.:

  char buffer[100];
  strcpy(buffer, "100");
  construe_cast<int>(buffer);

Depending on how the size (100) is taken into account, this may or may not be
an issue.