Re: [Boost-bugs] [Boost C++ Libraries] #6716: Unexpected behaviour when constructing iterator_range from string literal

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6716: Unexpected behaviour when constructing iterator_range from string literal
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-04-15 08:35:23


#6716: Unexpected behaviour when constructing iterator_range from string literal
-------------------------------------------------------+--------------------
  Reporter: Olaf van der Spek <olafvdspek@…> | Owner: neilgroves
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: range
   Version: Boost 1.48.0 | Severity: Problem
Resolution: invalid | Keywords:
-------------------------------------------------------+--------------------

Comment (by Olaf van der Spek <olafvdspek@…>):

 Hi Neil,

> When compared to the const char[5] literal "Olaf\0" this is handled as
 any array would be.

 That's the core of the problem. I did not expect this string literal to be
 handled as an array. Wouldn't it be safer to disallow implicit conversion
 of arrays and require the user to use as_array or as_literal to explicitly
 state what conversion is desired?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6716#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC