Re: [Boost-bugs] [Boost C++ Libraries] #2886: Boost.Array gives MS warnings C4510 and C4610

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2886: Boost.Array gives MS warnings C4510 and C4610
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-02-01 10:46:03


#2886: Boost.Array gives MS warnings C4510 and C4610
---------------------------+------------------------------------------------
 Reporter: pbristow | Owner: marshall
     Type: Bugs | Status: assigned
Milestone: Boost 1.39.0 | Component: array
  Version: Boost 1.38.0 | Severity: Cosmetic
 Keywords: array warning |
---------------------------+------------------------------------------------

Comment(by pbristow):

 Replying to [comment:5 marshall]:

 I haven't got 1.42 rc yet, but the code appears unchanged in trunk?

 I am still not clear if the warning should be suppressed (I suspect not
 suppressing is best) but the array docs should warn that to get an array
 with const values

  boost::array<const double, 2> stuff = { 1.2, 3.4}; // warnings

 so use instead

  const boost::array<double, 2> stuff = { 1.2, 3.4}; // No warnings.

 As Steven says, this is "because iterator::value_type is const double
 rather than double. "

 (But the docs appear to me to be in XML :-( so editing may be
 troublesome?).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2886#comment:6>
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:02 UTC