Boost logo

Boost :

Subject: [boost] [Range] Support for array references, svn:executable on headers
From: Bryce Lelbach (blelbach_at_[hidden])
Date: 2011-05-13 20:08:34


Boost.Range does not support array reference types. I'd like to add the
specializations/overloads/code to Boost.Range to support array reference types
(I have commit rights). Neil, is this alright? Does anyone see any see any
problems with such changes?

(some) of the places where changes are needed:

  2011.05.13_18.45.33< VeXocide> it works perfectly fine with char const [5], but not with char const (&)[5]
  [snip]
  2011.05.13_18.47.12< VeXocide> this probably means it's missing a whole bunch of specializations, because the other functions don't seem to support it either
  [snip]
  2011.05.13_18.57.41< wash> VeXocide: where else do you believe changes would need to be made?
  2011.05.13_18.58.43< VeXocide> wash, as far as I can tell (I've only checked a few) all functions at http://www.boost.org/doc/libs/1_46_1/libs/range/doc/html/range/reference/concept_implementation/semantics/metafunctions.html and http://www.boost.org/doc/libs/1_46_1/libs/range/doc/html/range/reference/concept_implementation/semantics/functions.html need to have the specializations added
  2011.05.13_18.59.49< VeXocide> an, range_end supports T (&a)[sz]
  2011.05.13_18.59.51< VeXocide> ah *
  2011.05.13_19.00.12< VeXocide> hmz
  2011.05.13_19.01.42< VeXocide> range_difference doesn't
  2011.05.13_19.01.53< wash> *nods*
  2011.05.13_19.02.30< VeXocide> range_iterator and range_const_iterator don't either
  2011.05.13_19.04.12< VeXocide> hmz

One test case demonstrating the problem:

  #include <boost/range.hpp>

  #include <iostream>
  #include <typeinfo>

  int main(void) {
    std::cout << typeid(boost::range_size<char const (&)[5]>::type).name() << std::endl;
    return 0;
  }

P.S. A number of the headers in Boost.Range have the svn:excecutable property.
     Can I remove this property from said headers?

-- 
Bryce Lelbach aka wash
boost-spirit.com
px.cct.lsu.edu
github.com/lll-project



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk