[Boost-bugs] [Boost C++ Libraries] #4280: Cannot get array type from boost::array

Subject: [Boost-bugs] [Boost C++ Libraries] #4280: Cannot get array type from boost::array
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-02 08:51:09


#4280: Cannot get array type from boost::array
--------------------------+-------------------------------------------------
 Reporter: anonymous | Owner: no-maintainer
     Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: array
  Version: Boost 1.44.0 | Severity: Optimization
 Keywords: |
--------------------------+-------------------------------------------------
 There is no function to get array from the boost::array.
 c_array returns pointer, and operator[] returns reference.

 There must be additional function, as_array.

 array<T, N>
 {
  typedef T array_type[N];

  array_type& as_array() { return elems; }
  array_type const& as_array() const { return elems; }

 }

 It is needed to allow optimizations when function has special overload for
 arrays.
 Like std::copy in VC compiler:

 1. copy(Input first, Input last, Output dest)
 2. copy(Input first, Input last, OutElem (&dest)[size])

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4280>
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:03 UTC