Re: [Boost-bugs] [Boost C++ Libraries] #2857: change return type of the c_array() member function

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2857: change return type of the c_array() member function
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-10-21 17:30:35


#2857: change return type of the c_array() member function
----------------------------------+-----------------------------------------
 Reporter: hervemart1@… | Owner: no-maintainer
     Type: Patches | Status: new
Milestone: Boost 1.39.0 | Component: array
  Version: Boost 1.38.0 | Severity: Cosmetic
 Keywords: |
----------------------------------+-----------------------------------------

Comment(by niels_dekker):

 Update: Yesterday, the Standard Library Working Group has discussed my
 proposal to add ''c_array()'' member functions to ''std::array'', in Santa
 Cruz. Unfortunately: ''There was not enough consensus that this was
 sufficiently useful.''
 http://home.roadrunner.com/~hinnant/issue_review/lwg-closed.html#930 So
 now it is unlikely that ''std::array'' will offer an easy way to get a
 reference to its internal built-in array.

 I wonder if it's safe to cast ''std::array<T,N>'' to a pointer-to-array,
 as follows:
 {{{
 static_cast<T(*)[N]>(static_cast<void*>(arr.data()));
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2857#comment:4>
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:01 UTC