Ticket #11511: boost_1_59_0.multi_array.wshadow.patch

File boost_1_59_0.multi_array.wshadow.patch, 19.5 KB (added by davido, 7 years ago)
  • boost/multi_array/concept_checks.hpp

    diff -ru boost.orig/boost/multi_array/concept_checks.hpp boost/boost/multi_array/concept_checks.hpp
    old new  
    162162      const_constraints(a);
    163163    }
    164164
    165     void const_constraints(const Array& a) {
     165    void const_constraints(const Array& a_) {
    166166
    167167      //      value_type vt = a[ id ];
    168168
    169169      // Test slicing, keeping only the first dimension, losing the rest
    170       detail::idgen_helper<NumDims-1>::call(a,idgen[range],id);
     170      detail::idgen_helper<NumDims-1>::call(a_,idgen[range],id);
    171171
    172172      // Test slicing, keeping all dimensions.
    173       detail::idgen_helper<NumDims-1>::call(a,idgen[range],range);
     173      detail::idgen_helper<NumDims-1>::call(a_,idgen[range],range);
    174174
    175       st = a.size();
    176       st = a.num_dimensions();
    177       st = a.num_elements();
    178       stp = a.shape();
    179       idp = a.strides();
    180       idp = a.index_bases();
    181       cit = a.begin();
    182       cit = a.end();
    183       crit = a.rbegin();
    184       crit = a.rend();
    185       eltp = a.origin();
     175      st = a_.size();
     176      st = a_.num_dimensions();
     177      st = a_.num_elements();
     178      stp = a_.shape();
     179      idp = a_.strides();
     180      idp = a_.index_bases();
     181      cit = a_.begin();
     182      cit = a_.end();
     183      crit = a_.rbegin();
     184      crit = a_.rend();
     185      eltp = a_.origin();
    186186    }
    187187
    188188    typedef typename Array::value_type value_type;
  • boost/multi_array/extent_range.hpp

    diff -ru boost.orig/boost/multi_array/extent_range.hpp boost/boost/multi_array/extent_range.hpp
    old new  
    2626  typedef Extent index;
    2727  typedef SizeType size_type;
    2828
    29   extent_range(index start, index finish) :
    30     super_type(start,finish) { }
     29  extent_range(index start_, index finish_) :
     30    super_type(start_,finish_) { }
    3131
    32   extent_range(index finish) :
    33     super_type(0,finish) { }
     32  extent_range(index finish_) :
     33    super_type(0,finish_) { }
    3434
    3535  extent_range() : super_type(0,0) { }
    3636
  • boost/multi_array/index_range.hpp

    diff -ru boost.orig/boost/multi_array/index_range.hpp boost/boost/multi_array/index_range.hpp
    old new  
    6060      degenerate_ = true;
    6161    }
    6262
    63     explicit index_range(index start, index finish, index stride=1)
    64       : start_(start), finish_(finish), stride_(stride),
     63    explicit index_range(index start_arg, index finish_arg, index stride_arg=1)
     64      : start_(start_arg), finish_(finish_arg), stride_(stride_arg),
    6565        degenerate_(false)
    6666    { }
    6767
     
    107107
    108108    index stride() const { return stride_; }
    109109
    110     void set_index_range(index start, index finish, index stride=1)
     110    void set_index_range(index start_arg, index finish_arg, index stride_arg=1)
    111111    {
    112       start_ = start;
    113       finish_ = finish;
    114       stride_ = stride;
     112      start_ = start_arg;
     113      finish_ = finish_arg;
     114      stride_ = stride_arg;
    115115    }
    116116
    117117    static index_range all()
  • boost/multi_array/multi_array_ref.hpp

    diff -ru boost.orig/boost/multi_array/multi_array_ref.hpp boost/boost/multi_array/multi_array_ref.hpp
    old new  
    125125  }
    126126 
    127127  template <class InputIterator>
    128   void assign(InputIterator begin, InputIterator end) {
     128  void assign(InputIterator begin_, InputIterator end_) {
    129129    boost::function_requires<InputIteratorConcept<InputIterator> >();
    130130
    131     InputIterator in_iter = begin;
     131    InputIterator in_iter = begin_;
    132132    T* out_iter = base_;
    133133    std::size_t copy_count=0;
    134     while (in_iter != end && copy_count < num_elements_) {
     134    while (in_iter != end_ && copy_count < num_elements_) {
    135135      *out_iter++ = *in_iter++;
    136136      copy_count++;     
    137137    }
     
    324324  explicit
    325325  const_multi_array_ref(TPtr base,
    326326                        const storage_order_type& so,
    327                         const index * index_bases,
     327                        const index * index_bases_,
    328328                        const size_type* extents) :
    329329    base_(base), storage_(so), origin_offset_(0), directional_offset_(0)
    330330 {
    331331   // If index_bases or extents is null, then initialize the corresponding
    332332   // private data to zeroed lists.
    333    if(index_bases) {
     333   if(index_bases_) {
    334334     boost::detail::multi_array::
    335        copy_n(index_bases,NumDims,index_base_list_.begin());
     335       copy_n(index_bases_,NumDims,index_base_list_.begin());
    336336   } else {
    337337     std::fill_n(index_base_list_.begin(),NumDims,0);
    338338   }
     
    611611  // This is only supplied to support multi_array's default constructor
    612612  explicit multi_array_ref(T* base,
    613613                           const storage_order_type& so,
    614                            const index* index_bases,
     614                           const index* index_bases_arg,
    615615                           const size_type* extents) :
    616     super_type(base,so,index_bases,extents) { }
     616    super_type(base,so,index_bases_arg,extents) { }
    617617
    618618};
    619619
  • boost/multi_array/storage_order.hpp

    diff -ru boost.orig/boost/multi_array/storage_order.hpp boost/boost/multi_array/storage_order.hpp
    old new  
    3434  public:
    3535    typedef detail::multi_array::size_type size_type;
    3636    template <typename OrderingIter, typename AscendingIter>
    37     general_storage_order(OrderingIter ordering,
    38                           AscendingIter ascending) {
    39       boost::detail::multi_array::copy_n(ordering,NumDims,ordering_.begin());
    40       boost::detail::multi_array::copy_n(ascending,NumDims,ascending_.begin());
     37    general_storage_order(OrderingIter ordering_arg,
     38                          AscendingIter ascending_arg) {
     39      boost::detail::multi_array::copy_n(ordering_arg,NumDims,ordering_.begin());
     40      boost::detail::multi_array::copy_n(ascending_arg,NumDims,ascending_.begin());
    4141    }
    4242
    4343    // RG - ideally these would not be necessary, but some compilers
  • boost/multi_array/subarray.hpp

    diff -ru boost.orig/boost/multi_array/subarray.hpp boost/boost/multi_array/subarray.hpp
    old new  
    177177
    178178  const_sub_array (TPtr base,
    179179                 const size_type* extents,
    180                  const index* strides,
     180                 const index* strides_arg,
    181181                 const index* index_base) :
    182     base_(base), extents_(extents), strides_(strides),
     182    base_(base), extents_(extents), strides_(strides_arg),
    183183    index_base_(index_base) {
    184184  }
    185185
     
    357357
    358358  sub_array (T* base,
    359359            const size_type* extents,
    360             const index* strides,
     360            const index* strides_arg,
    361361            const index* index_base) :
    362     super_type(base,extents,strides,index_base) {
     362    super_type(base,extents,strides_arg,index_base) {
    363363  }
    364364
    365365};
  • boost/multi_array/view.hpp

    diff -ru boost.orig/boost/multi_array/view.hpp boost/boost/multi_array/view.hpp
    old new  
    228228  template <typename ExtentList, typename Index>
    229229  explicit const_multi_array_view(TPtr base,
    230230                           const ExtentList& extents,
    231                            const boost::array<Index,NumDims>& strides):
     231                           const boost::array<Index,NumDims>& strides_):
    232232    base_(base), origin_offset_(0) {
    233233
    234234    index_base_list_.assign(0);
     
    237237    boost::detail::multi_array::
    238238      copy_n(extents.begin(),NumDims,extent_list_.begin());
    239239    boost::detail::multi_array::
    240       copy_n(strides.begin(),NumDims,stride_list_.begin());
     240      copy_n(strides_.begin(),NumDims,stride_list_.begin());
    241241
    242242    // Calculate the array size
    243243    num_elements_ = std::accumulate(extent_list_.begin(),extent_list_.end(),
     
    430430  template <typename ExtentList, typename Index>
    431431  explicit multi_array_view(T* base,
    432432                            const ExtentList& extents,
    433                             const boost::array<Index,NumDims>& strides) :
    434     super_type(base,extents,strides) { }
     433                            const boost::array<Index,NumDims>& strides_) :
     434    super_type(base,extents,strides_) { }
    435435
    436436};
    437437
  • boost/multi_array/multi_array_ref.hpp

    diff -ru boost.org/boost/multi_array/multi_array_ref.hpp boost/boost/multi_array/multi_array_ref.hpp
    old new  
    8787      num_elements_(other.num_elements_)  {  }
    8888
    8989  template <typename ExtentList>
    90   explicit const_multi_array_ref(TPtr base, const ExtentList& extents) :
     90  explicit const_multi_array_ref(TPtr base, const ExtentList& extents_arg) :
    9191    base_(base), storage_(c_storage_order()) {
    9292    boost::function_requires<
    9393      CollectionConcept<ExtentList> >();
    9494
    9595    index_base_list_.assign(0);
    96     init_multi_array_ref(extents.begin());
     96    init_multi_array_ref(extents_arg.begin());
    9797  }
    9898 
    9999  template <typename ExtentList>
    100   explicit const_multi_array_ref(TPtr base, const ExtentList& extents,
     100  explicit const_multi_array_ref(TPtr base, const ExtentList& extents_arg,
    101101                       const general_storage_order<NumDims>& so) :
    102102    base_(base), storage_(so) {
    103103    boost::function_requires<
    104104      CollectionConcept<ExtentList> >();
    105105
    106106    index_base_list_.assign(0);
    107     init_multi_array_ref(extents.begin());
     107    init_multi_array_ref(extents_arg.begin());
    108108  }
    109109 
    110110  explicit const_multi_array_ref(TPtr base,
     
    162162  }
    163163
    164164  template <typename SizeList>
    165   void reshape(const SizeList& extents) {
     165  void reshape(const SizeList& extents_arg) {
    166166    boost::function_requires<
    167167      CollectionConcept<SizeList> >();
    168168    BOOST_ASSERT(num_elements_ ==
    169                  std::accumulate(extents.begin(),extents.end(),
     169                 std::accumulate(extents_arg.begin(),extents_arg.end(),
    170170                                 size_type(1),std::multiplies<size_type>()));
    171171
    172     std::copy(extents.begin(),extents.end(),extent_list_.begin());
     172    std::copy(extents_arg.begin(),extents_arg.end(),extent_list_.begin());
    173173    this->compute_strides(stride_list_,extent_list_,storage_);
    174174
    175175    origin_offset_ =
     
    209209  }
    210210
    211211  template <typename IndexList>
    212   const element& operator()(IndexList indices) const {
     212  const element& operator()(IndexList indices_arg) const {
    213213    boost::function_requires<
    214214      CollectionConcept<IndexList> >();
    215215    return super_type::access_element(boost::type<const element&>(),
    216                                       indices,origin(),
     216                                      indices_arg,origin(),
    217217                                      shape(),strides(),index_bases());
    218218  }
    219219
     
    228228  template <int NDims>
    229229  typename const_array_view<NDims>::type
    230230  operator[](const detail::multi_array::
    231              index_gen<NumDims,NDims>& indices)
     231             index_gen<NumDims,NDims>& indices_arg)
    232232    const {
    233233    typedef typename const_array_view<NDims>::type return_type;
    234234    return
    235235      super_type::generate_array_view(boost::type<return_type>(),
    236                                       indices,
     236                                      indices_arg,
    237237                                      shape(),
    238238                                      strides(),
    239239                                      index_bases(),
     
    325325  const_multi_array_ref(TPtr base,
    326326                        const storage_order_type& so,
    327327                        const index * index_bases_,
    328                         const size_type* extents) :
     328                        const size_type* extents_arg) :
    329329    base_(base), storage_(so), origin_offset_(0), directional_offset_(0)
    330330 {
    331331   // If index_bases or extents is null, then initialize the corresponding
     
    336336   } else {
    337337     std::fill_n(index_base_list_.begin(),NumDims,0);
    338338   }
    339    if(extents) {
    340      init_multi_array_ref(extents);
     339   if(extents_arg) {
     340     init_multi_array_ref(extents_arg);
    341341   } else {
    342342     boost::array<index,NumDims> extent_list;
    343343     extent_list.assign(0);
     
    371371              boost::mem_fun_ref(&extent_range::start));
    372372
    373373    // calculate the extents
    374     extent_list extents;
     374    extent_list extents_local;
    375375    std::transform(ranges.ranges_.begin(),ranges.ranges_.end(),
    376               extents.begin(),
     376              extents_local.begin(),
    377377              boost::mem_fun_ref(&extent_range::size));
    378378
    379     init_multi_array_ref(extents.begin());
     379    init_multi_array_ref(extents_local.begin());
    380380  }
    381381
    382382
     
    442442  };
    443443
    444444  template <class ExtentList>
    445   explicit multi_array_ref(T* base, const ExtentList& extents) :
    446     super_type(base,extents) {
     445  explicit multi_array_ref(T* base, const ExtentList& extents_arg) :
     446    super_type(base,extents_arg) {
    447447    boost::function_requires<
    448448      CollectionConcept<ExtentList> >();
    449449  }
    450450
    451451  template <class ExtentList>
    452   explicit multi_array_ref(T* base, const ExtentList& extents,
     452  explicit multi_array_ref(T* base, const ExtentList& extents_arg,
    453453                           const general_storage_order<NumDims>& so) :
    454     super_type(base,extents,so) {
     454    super_type(base,extents_arg,so) {
    455455    boost::function_requires<
    456456      CollectionConcept<ExtentList> >();
    457457  }
     
    506506  element* data() { return super_type::base_; }
    507507
    508508  template <class IndexList>
    509   element& operator()(const IndexList& indices) {
     509  element& operator()(const IndexList& indices_arg) {
    510510    boost::function_requires<
    511511      CollectionConcept<IndexList> >();
    512512    return super_type::access_element(boost::type<element&>(),
    513                                       indices,origin(),
     513                                      indices_arg,origin(),
    514514                                      this->shape(),this->strides(),
    515515                                      this->index_bases());
    516516  }
     
    528528  template <int NDims>
    529529  typename array_view<NDims>::type
    530530  operator[](const detail::multi_array::
    531              index_gen<NumDims,NDims>& indices) {
     531             index_gen<NumDims,NDims>& indices_arg) {
    532532    typedef typename array_view<NDims>::type return_type;
    533533    return
    534534      super_type::generate_array_view(boost::type<return_type>(),
    535                                       indices,
     535                                      indices_arg,
    536536                                      this->shape(),
    537537                                      this->strides(),
    538538                                      this->index_bases(),
     
    569569  const element* data() const { return super_type::data(); }
    570570
    571571  template <class IndexList>
    572   const element& operator()(const IndexList& indices) const {
     572  const element& operator()(const IndexList& indices_arg) const {
    573573    boost::function_requires<
    574574      CollectionConcept<IndexList> >();
    575     return super_type::operator()(indices);
     575    return super_type::operator()(indices_arg);
    576576  }
    577577
    578578  const_reference operator[](index idx) const {
     
    586586  template <int NDims>
    587587  typename const_array_view<NDims>::type
    588588  operator[](const detail::multi_array::
    589              index_gen<NumDims,NDims>& indices)
     589             index_gen<NumDims,NDims>& indices_arg)
    590590    const {
    591     return super_type::operator[](indices);
     591    return super_type::operator[](indices_arg);
    592592  }
    593593 
    594594  const_iterator begin() const {
     
    612612  explicit multi_array_ref(T* base,
    613613                           const storage_order_type& so,
    614614                           const index* index_bases_arg,
    615                            const size_type* extents) :
    616     super_type(base,so,index_bases_arg,extents) { }
     615                           const size_type* extents_arg) :
     616    super_type(base,so,index_bases_arg,extents_arg) { }
    617617
    618618};
    619619
  • boost/multi_array.hpp

    diff -ru boost.org/boost/multi_array.hpp boost/boost/multi_array.hpp
    old new  
    145145
    146146  template <class ExtentList>
    147147  explicit multi_array(
    148       ExtentList const& extents
     148      ExtentList const& extents_arg
    149149#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
    150150      , typename mpl::if_<
    151151      detail::multi_array::is_multi_array_impl<ExtentList>,
    152152      int&,int>::type* = 0
    153153#endif
    154154      ) :
    155     super_type((T*)initial_base_,extents) {
     155    super_type((T*)initial_base_,extents_arg) {
    156156    boost::function_requires<
    157157      detail::multi_array::CollectionConcept<ExtentList> >();
    158158    allocate_space();
     
    160160
    161161   
    162162  template <class ExtentList>
    163   explicit multi_array(ExtentList const& extents,
     163  explicit multi_array(ExtentList const& extents_arg,
    164164                       const general_storage_order<NumDims>& so) :
    165     super_type((T*)initial_base_,extents,so) {
     165    super_type((T*)initial_base_,extents_arg,so) {
    166166    boost::function_requires<
    167167      detail::multi_array::CollectionConcept<ExtentList> >();
    168168    allocate_space();
    169169  }
    170170
    171171  template <class ExtentList>
    172   explicit multi_array(ExtentList const& extents,
     172  explicit multi_array(ExtentList const& extents_arg,
    173173                       const general_storage_order<NumDims>& so,
    174174                       Allocator const& alloc) :
    175     super_type((T*)initial_base_,extents,so), allocator_(alloc) {
     175    super_type((T*)initial_base_,extents_arg,so), allocator_(alloc) {
    176176    boost::function_requires<
    177177      detail::multi_array::CollectionConcept<ExtentList> >();
    178178    allocate_space();
     
    381381
    382382
    383383  template <typename ExtentList>
    384   multi_array& resize(const ExtentList& extents) {
     384  multi_array& resize(const ExtentList& extents_arg) {
    385385    boost::function_requires<
    386386      detail::multi_array::CollectionConcept<ExtentList> >();
    387387
     
    390390
    391391    for (int i=0; i != NumDims; ++i) {
    392392      typedef typename gen_type::range range_type;
    393       ranges.ranges_[i] = range_type(0,extents[i]);
     393      ranges.ranges_[i] = range_type(0,extents_arg[i]);
    394394    }
    395395   
    396396    return this->resize(ranges);
  • boost/property_tree/detail/json_parser/wide_encoding.hpp

    diff -ru boost.org/boost/property_tree/detail/json_parser/wide_encoding.hpp boost/boost/property_tree/detail/json_parser/wide_encoding.hpp
    old new  
    104104
    105105        template <typename Iterator, typename Sentinel, typename TranscodedFn,
    106106                  typename EncodingErrorFn>
    107         void transcode_codepoint(Iterator& cur, Sentinel end,
     107        void transcode_codepoint(Iterator& cur, Sentinel,
    108108                                 TranscodedFn transcoded_fn,
    109109                                 EncodingErrorFn error_fn,
    110110                                 is_utf16<false>) const {
     
    117117        }
    118118        template <typename Iterator, typename Sentinel, typename TranscodedFn,
    119119                  typename EncodingErrorFn>
    120         void transcode_codepoint(Iterator& cur, Sentinel end,
     120        void transcode_codepoint(Iterator& cur, Sentinel,
    121121                                 TranscodedFn transcoded_fn,
    122122                                 EncodingErrorFn error_fn,
    123123                                 is_utf16<true>) const {