diff -ru boost.orig/boost/multi_array/concept_checks.hpp boost/boost/multi_array/concept_checks.hpp
old
|
new
|
|
162 | 162 | const_constraints(a); |
163 | 163 | } |
164 | 164 | |
165 | | void const_constraints(const Array& a) { |
| 165 | void const_constraints(const Array& a_) { |
166 | 166 | |
167 | 167 | // value_type vt = a[ id ]; |
168 | 168 | |
169 | 169 | // 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); |
171 | 171 | |
172 | 172 | // 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); |
174 | 174 | |
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(); |
186 | 186 | } |
187 | 187 | |
188 | 188 | typedef typename Array::value_type value_type; |
diff -ru boost.orig/boost/multi_array/extent_range.hpp boost/boost/multi_array/extent_range.hpp
old
|
new
|
|
26 | 26 | typedef Extent index; |
27 | 27 | typedef SizeType size_type; |
28 | 28 | |
29 | | extent_range(index start, index finish) : |
30 | | super_type(start,finish) { } |
| 29 | extent_range(index start_, index finish_) : |
| 30 | super_type(start_,finish_) { } |
31 | 31 | |
32 | | extent_range(index finish) : |
33 | | super_type(0,finish) { } |
| 32 | extent_range(index finish_) : |
| 33 | super_type(0,finish_) { } |
34 | 34 | |
35 | 35 | extent_range() : super_type(0,0) { } |
36 | 36 | |
diff -ru boost.orig/boost/multi_array/index_range.hpp boost/boost/multi_array/index_range.hpp
old
|
new
|
|
60 | 60 | degenerate_ = true; |
61 | 61 | } |
62 | 62 | |
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), |
65 | 65 | degenerate_(false) |
66 | 66 | { } |
67 | 67 | |
… |
… |
|
107 | 107 | |
108 | 108 | index stride() const { return stride_; } |
109 | 109 | |
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) |
111 | 111 | { |
112 | | start_ = start; |
113 | | finish_ = finish; |
114 | | stride_ = stride; |
| 112 | start_ = start_arg; |
| 113 | finish_ = finish_arg; |
| 114 | stride_ = stride_arg; |
115 | 115 | } |
116 | 116 | |
117 | 117 | static index_range all() |
diff -ru boost.orig/boost/multi_array/multi_array_ref.hpp boost/boost/multi_array/multi_array_ref.hpp
old
|
new
|
|
125 | 125 | } |
126 | 126 | |
127 | 127 | template <class InputIterator> |
128 | | void assign(InputIterator begin, InputIterator end) { |
| 128 | void assign(InputIterator begin_, InputIterator end_) { |
129 | 129 | boost::function_requires<InputIteratorConcept<InputIterator> >(); |
130 | 130 | |
131 | | InputIterator in_iter = begin; |
| 131 | InputIterator in_iter = begin_; |
132 | 132 | T* out_iter = base_; |
133 | 133 | std::size_t copy_count=0; |
134 | | while (in_iter != end && copy_count < num_elements_) { |
| 134 | while (in_iter != end_ && copy_count < num_elements_) { |
135 | 135 | *out_iter++ = *in_iter++; |
136 | 136 | copy_count++; |
137 | 137 | } |
… |
… |
|
324 | 324 | explicit |
325 | 325 | const_multi_array_ref(TPtr base, |
326 | 326 | const storage_order_type& so, |
327 | | const index * index_bases, |
| 327 | const index * index_bases_, |
328 | 328 | const size_type* extents) : |
329 | 329 | base_(base), storage_(so), origin_offset_(0), directional_offset_(0) |
330 | 330 | { |
331 | 331 | // If index_bases or extents is null, then initialize the corresponding |
332 | 332 | // private data to zeroed lists. |
333 | | if(index_bases) { |
| 333 | if(index_bases_) { |
334 | 334 | boost::detail::multi_array:: |
335 | | copy_n(index_bases,NumDims,index_base_list_.begin()); |
| 335 | copy_n(index_bases_,NumDims,index_base_list_.begin()); |
336 | 336 | } else { |
337 | 337 | std::fill_n(index_base_list_.begin(),NumDims,0); |
338 | 338 | } |
… |
… |
|
611 | 611 | // This is only supplied to support multi_array's default constructor |
612 | 612 | explicit multi_array_ref(T* base, |
613 | 613 | const storage_order_type& so, |
614 | | const index* index_bases, |
| 614 | const index* index_bases_arg, |
615 | 615 | const size_type* extents) : |
616 | | super_type(base,so,index_bases,extents) { } |
| 616 | super_type(base,so,index_bases_arg,extents) { } |
617 | 617 | |
618 | 618 | }; |
619 | 619 | |
diff -ru boost.orig/boost/multi_array/storage_order.hpp boost/boost/multi_array/storage_order.hpp
old
|
new
|
|
34 | 34 | public: |
35 | 35 | typedef detail::multi_array::size_type size_type; |
36 | 36 | 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()); |
41 | 41 | } |
42 | 42 | |
43 | 43 | // RG - ideally these would not be necessary, but some compilers |
diff -ru boost.orig/boost/multi_array/subarray.hpp boost/boost/multi_array/subarray.hpp
old
|
new
|
|
177 | 177 | |
178 | 178 | const_sub_array (TPtr base, |
179 | 179 | const size_type* extents, |
180 | | const index* strides, |
| 180 | const index* strides_arg, |
181 | 181 | const index* index_base) : |
182 | | base_(base), extents_(extents), strides_(strides), |
| 182 | base_(base), extents_(extents), strides_(strides_arg), |
183 | 183 | index_base_(index_base) { |
184 | 184 | } |
185 | 185 | |
… |
… |
|
357 | 357 | |
358 | 358 | sub_array (T* base, |
359 | 359 | const size_type* extents, |
360 | | const index* strides, |
| 360 | const index* strides_arg, |
361 | 361 | const index* index_base) : |
362 | | super_type(base,extents,strides,index_base) { |
| 362 | super_type(base,extents,strides_arg,index_base) { |
363 | 363 | } |
364 | 364 | |
365 | 365 | }; |
diff -ru boost.orig/boost/multi_array/view.hpp boost/boost/multi_array/view.hpp
old
|
new
|
|
228 | 228 | template <typename ExtentList, typename Index> |
229 | 229 | explicit const_multi_array_view(TPtr base, |
230 | 230 | const ExtentList& extents, |
231 | | const boost::array<Index,NumDims>& strides): |
| 231 | const boost::array<Index,NumDims>& strides_): |
232 | 232 | base_(base), origin_offset_(0) { |
233 | 233 | |
234 | 234 | index_base_list_.assign(0); |
… |
… |
|
237 | 237 | boost::detail::multi_array:: |
238 | 238 | copy_n(extents.begin(),NumDims,extent_list_.begin()); |
239 | 239 | boost::detail::multi_array:: |
240 | | copy_n(strides.begin(),NumDims,stride_list_.begin()); |
| 240 | copy_n(strides_.begin(),NumDims,stride_list_.begin()); |
241 | 241 | |
242 | 242 | // Calculate the array size |
243 | 243 | num_elements_ = std::accumulate(extent_list_.begin(),extent_list_.end(), |
… |
… |
|
430 | 430 | template <typename ExtentList, typename Index> |
431 | 431 | explicit multi_array_view(T* base, |
432 | 432 | 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_) { } |
435 | 435 | |
436 | 436 | }; |
437 | 437 | |
diff -ru boost.org/boost/multi_array/multi_array_ref.hpp boost/boost/multi_array/multi_array_ref.hpp
old
|
new
|
|
87 | 87 | num_elements_(other.num_elements_) { } |
88 | 88 | |
89 | 89 | 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) : |
91 | 91 | base_(base), storage_(c_storage_order()) { |
92 | 92 | boost::function_requires< |
93 | 93 | CollectionConcept<ExtentList> >(); |
94 | 94 | |
95 | 95 | index_base_list_.assign(0); |
96 | | init_multi_array_ref(extents.begin()); |
| 96 | init_multi_array_ref(extents_arg.begin()); |
97 | 97 | } |
98 | 98 | |
99 | 99 | 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, |
101 | 101 | const general_storage_order<NumDims>& so) : |
102 | 102 | base_(base), storage_(so) { |
103 | 103 | boost::function_requires< |
104 | 104 | CollectionConcept<ExtentList> >(); |
105 | 105 | |
106 | 106 | index_base_list_.assign(0); |
107 | | init_multi_array_ref(extents.begin()); |
| 107 | init_multi_array_ref(extents_arg.begin()); |
108 | 108 | } |
109 | 109 | |
110 | 110 | explicit const_multi_array_ref(TPtr base, |
… |
… |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | template <typename SizeList> |
165 | | void reshape(const SizeList& extents) { |
| 165 | void reshape(const SizeList& extents_arg) { |
166 | 166 | boost::function_requires< |
167 | 167 | CollectionConcept<SizeList> >(); |
168 | 168 | BOOST_ASSERT(num_elements_ == |
169 | | std::accumulate(extents.begin(),extents.end(), |
| 169 | std::accumulate(extents_arg.begin(),extents_arg.end(), |
170 | 170 | size_type(1),std::multiplies<size_type>())); |
171 | 171 | |
172 | | std::copy(extents.begin(),extents.end(),extent_list_.begin()); |
| 172 | std::copy(extents_arg.begin(),extents_arg.end(),extent_list_.begin()); |
173 | 173 | this->compute_strides(stride_list_,extent_list_,storage_); |
174 | 174 | |
175 | 175 | origin_offset_ = |
… |
… |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | template <typename IndexList> |
212 | | const element& operator()(IndexList indices) const { |
| 212 | const element& operator()(IndexList indices_arg) const { |
213 | 213 | boost::function_requires< |
214 | 214 | CollectionConcept<IndexList> >(); |
215 | 215 | return super_type::access_element(boost::type<const element&>(), |
216 | | indices,origin(), |
| 216 | indices_arg,origin(), |
217 | 217 | shape(),strides(),index_bases()); |
218 | 218 | } |
219 | 219 | |
… |
… |
|
228 | 228 | template <int NDims> |
229 | 229 | typename const_array_view<NDims>::type |
230 | 230 | operator[](const detail::multi_array:: |
231 | | index_gen<NumDims,NDims>& indices) |
| 231 | index_gen<NumDims,NDims>& indices_arg) |
232 | 232 | const { |
233 | 233 | typedef typename const_array_view<NDims>::type return_type; |
234 | 234 | return |
235 | 235 | super_type::generate_array_view(boost::type<return_type>(), |
236 | | indices, |
| 236 | indices_arg, |
237 | 237 | shape(), |
238 | 238 | strides(), |
239 | 239 | index_bases(), |
… |
… |
|
325 | 325 | const_multi_array_ref(TPtr base, |
326 | 326 | const storage_order_type& so, |
327 | 327 | const index * index_bases_, |
328 | | const size_type* extents) : |
| 328 | const size_type* extents_arg) : |
329 | 329 | base_(base), storage_(so), origin_offset_(0), directional_offset_(0) |
330 | 330 | { |
331 | 331 | // If index_bases or extents is null, then initialize the corresponding |
… |
… |
|
336 | 336 | } else { |
337 | 337 | std::fill_n(index_base_list_.begin(),NumDims,0); |
338 | 338 | } |
339 | | if(extents) { |
340 | | init_multi_array_ref(extents); |
| 339 | if(extents_arg) { |
| 340 | init_multi_array_ref(extents_arg); |
341 | 341 | } else { |
342 | 342 | boost::array<index,NumDims> extent_list; |
343 | 343 | extent_list.assign(0); |
… |
… |
|
371 | 371 | boost::mem_fun_ref(&extent_range::start)); |
372 | 372 | |
373 | 373 | // calculate the extents |
374 | | extent_list extents; |
| 374 | extent_list extents_local; |
375 | 375 | std::transform(ranges.ranges_.begin(),ranges.ranges_.end(), |
376 | | extents.begin(), |
| 376 | extents_local.begin(), |
377 | 377 | boost::mem_fun_ref(&extent_range::size)); |
378 | 378 | |
379 | | init_multi_array_ref(extents.begin()); |
| 379 | init_multi_array_ref(extents_local.begin()); |
380 | 380 | } |
381 | 381 | |
382 | 382 | |
… |
… |
|
442 | 442 | }; |
443 | 443 | |
444 | 444 | 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) { |
447 | 447 | boost::function_requires< |
448 | 448 | CollectionConcept<ExtentList> >(); |
449 | 449 | } |
450 | 450 | |
451 | 451 | template <class ExtentList> |
452 | | explicit multi_array_ref(T* base, const ExtentList& extents, |
| 452 | explicit multi_array_ref(T* base, const ExtentList& extents_arg, |
453 | 453 | const general_storage_order<NumDims>& so) : |
454 | | super_type(base,extents,so) { |
| 454 | super_type(base,extents_arg,so) { |
455 | 455 | boost::function_requires< |
456 | 456 | CollectionConcept<ExtentList> >(); |
457 | 457 | } |
… |
… |
|
506 | 506 | element* data() { return super_type::base_; } |
507 | 507 | |
508 | 508 | template <class IndexList> |
509 | | element& operator()(const IndexList& indices) { |
| 509 | element& operator()(const IndexList& indices_arg) { |
510 | 510 | boost::function_requires< |
511 | 511 | CollectionConcept<IndexList> >(); |
512 | 512 | return super_type::access_element(boost::type<element&>(), |
513 | | indices,origin(), |
| 513 | indices_arg,origin(), |
514 | 514 | this->shape(),this->strides(), |
515 | 515 | this->index_bases()); |
516 | 516 | } |
… |
… |
|
528 | 528 | template <int NDims> |
529 | 529 | typename array_view<NDims>::type |
530 | 530 | operator[](const detail::multi_array:: |
531 | | index_gen<NumDims,NDims>& indices) { |
| 531 | index_gen<NumDims,NDims>& indices_arg) { |
532 | 532 | typedef typename array_view<NDims>::type return_type; |
533 | 533 | return |
534 | 534 | super_type::generate_array_view(boost::type<return_type>(), |
535 | | indices, |
| 535 | indices_arg, |
536 | 536 | this->shape(), |
537 | 537 | this->strides(), |
538 | 538 | this->index_bases(), |
… |
… |
|
569 | 569 | const element* data() const { return super_type::data(); } |
570 | 570 | |
571 | 571 | template <class IndexList> |
572 | | const element& operator()(const IndexList& indices) const { |
| 572 | const element& operator()(const IndexList& indices_arg) const { |
573 | 573 | boost::function_requires< |
574 | 574 | CollectionConcept<IndexList> >(); |
575 | | return super_type::operator()(indices); |
| 575 | return super_type::operator()(indices_arg); |
576 | 576 | } |
577 | 577 | |
578 | 578 | const_reference operator[](index idx) const { |
… |
… |
|
586 | 586 | template <int NDims> |
587 | 587 | typename const_array_view<NDims>::type |
588 | 588 | operator[](const detail::multi_array:: |
589 | | index_gen<NumDims,NDims>& indices) |
| 589 | index_gen<NumDims,NDims>& indices_arg) |
590 | 590 | const { |
591 | | return super_type::operator[](indices); |
| 591 | return super_type::operator[](indices_arg); |
592 | 592 | } |
593 | 593 | |
594 | 594 | const_iterator begin() const { |
… |
… |
|
612 | 612 | explicit multi_array_ref(T* base, |
613 | 613 | const storage_order_type& so, |
614 | 614 | 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) { } |
617 | 617 | |
618 | 618 | }; |
619 | 619 | |
diff -ru boost.org/boost/multi_array.hpp boost/boost/multi_array.hpp
old
|
new
|
|
145 | 145 | |
146 | 146 | template <class ExtentList> |
147 | 147 | explicit multi_array( |
148 | | ExtentList const& extents |
| 148 | ExtentList const& extents_arg |
149 | 149 | #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING |
150 | 150 | , typename mpl::if_< |
151 | 151 | detail::multi_array::is_multi_array_impl<ExtentList>, |
152 | 152 | int&,int>::type* = 0 |
153 | 153 | #endif |
154 | 154 | ) : |
155 | | super_type((T*)initial_base_,extents) { |
| 155 | super_type((T*)initial_base_,extents_arg) { |
156 | 156 | boost::function_requires< |
157 | 157 | detail::multi_array::CollectionConcept<ExtentList> >(); |
158 | 158 | allocate_space(); |
… |
… |
|
160 | 160 | |
161 | 161 | |
162 | 162 | template <class ExtentList> |
163 | | explicit multi_array(ExtentList const& extents, |
| 163 | explicit multi_array(ExtentList const& extents_arg, |
164 | 164 | const general_storage_order<NumDims>& so) : |
165 | | super_type((T*)initial_base_,extents,so) { |
| 165 | super_type((T*)initial_base_,extents_arg,so) { |
166 | 166 | boost::function_requires< |
167 | 167 | detail::multi_array::CollectionConcept<ExtentList> >(); |
168 | 168 | allocate_space(); |
169 | 169 | } |
170 | 170 | |
171 | 171 | template <class ExtentList> |
172 | | explicit multi_array(ExtentList const& extents, |
| 172 | explicit multi_array(ExtentList const& extents_arg, |
173 | 173 | const general_storage_order<NumDims>& so, |
174 | 174 | Allocator const& alloc) : |
175 | | super_type((T*)initial_base_,extents,so), allocator_(alloc) { |
| 175 | super_type((T*)initial_base_,extents_arg,so), allocator_(alloc) { |
176 | 176 | boost::function_requires< |
177 | 177 | detail::multi_array::CollectionConcept<ExtentList> >(); |
178 | 178 | allocate_space(); |
… |
… |
|
381 | 381 | |
382 | 382 | |
383 | 383 | template <typename ExtentList> |
384 | | multi_array& resize(const ExtentList& extents) { |
| 384 | multi_array& resize(const ExtentList& extents_arg) { |
385 | 385 | boost::function_requires< |
386 | 386 | detail::multi_array::CollectionConcept<ExtentList> >(); |
387 | 387 | |
… |
… |
|
390 | 390 | |
391 | 391 | for (int i=0; i != NumDims; ++i) { |
392 | 392 | 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]); |
394 | 394 | } |
395 | 395 | |
396 | 396 | return this->resize(ranges); |
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
|
|
104 | 104 | |
105 | 105 | template <typename Iterator, typename Sentinel, typename TranscodedFn, |
106 | 106 | typename EncodingErrorFn> |
107 | | void transcode_codepoint(Iterator& cur, Sentinel end, |
| 107 | void transcode_codepoint(Iterator& cur, Sentinel, |
108 | 108 | TranscodedFn transcoded_fn, |
109 | 109 | EncodingErrorFn error_fn, |
110 | 110 | is_utf16<false>) const { |
… |
… |
|
117 | 117 | } |
118 | 118 | template <typename Iterator, typename Sentinel, typename TranscodedFn, |
119 | 119 | typename EncodingErrorFn> |
120 | | void transcode_codepoint(Iterator& cur, Sentinel end, |
| 120 | void transcode_codepoint(Iterator& cur, Sentinel, |
121 | 121 | TranscodedFn transcoded_fn, |
122 | 122 | EncodingErrorFn error_fn, |
123 | 123 | is_utf16<true>) const { |