@@ -89,38 +89,38 @@ struct binary_operation_obj
8989 using result_type = Result;
9090
9191 template <typename V1, typename V2> BOOST_FORCEINLINE
92- result_type operator ()(const std::pair<const V1*,const V2*>& p) const {
92+ auto operator ()(const std::pair<const V1*,const V2*>& p) const -> result_type {
9393 return apply (*p.first , *p.second , typename views_are_compatible<V1,V2>::type ());
9494 }
9595
9696 template <typename V1, typename V2> BOOST_FORCEINLINE
97- result_type operator ()(const V1& v1, const V2& v2) const {
97+ auto operator ()(const V1& v1, const V2& v2) const -> result_type {
9898 return apply (v1, v2, typename views_are_compatible<V1,V2>::type ());
9999 }
100100
101- result_type operator ()(const error_t &) const { throw std::bad_cast (); }
101+ auto operator ()(const error_t &) const -> result_type { throw std::bad_cast (); }
102102private:
103103
104104 // dispatch from apply overload to a function with distinct name
105105 template <typename V1, typename V2>
106106 BOOST_FORCEINLINE
107- result_type apply (V1 const & v1, V2 const & v2, std::false_type) const
107+ auto apply (V1 const & v1, V2 const & v2, std::false_type) const -> result_type
108108 {
109109 return ((const Derived*)this )->apply_incompatible (v1, v2);
110110 }
111111
112112 // dispatch from apply overload to a function with distinct name
113113 template <typename V1, typename V2>
114114 BOOST_FORCEINLINE
115- result_type apply (V1 const & v1, V2 const & v2, std::true_type) const
115+ auto apply (V1 const & v1, V2 const & v2, std::true_type) const -> result_type
116116 {
117117 return ((const Derived*)this )->apply_compatible (v1, v2);
118118 }
119119
120120 // function with distinct name - it can be overloaded by subclasses
121121 template <typename V1, typename V2>
122122 BOOST_FORCEINLINE
123- result_type apply_incompatible (V1 const & /* v1*/ , V2 const & /* v2*/ ) const
123+ auto apply_incompatible (V1 const & /* v1*/ , V2 const & /* v2*/ ) const -> result_type
124124 {
125125 throw std::bad_cast ();
126126 }
@@ -155,9 +155,10 @@ auto copy(
155155// / \ingroup STLOptimizations
156156// / \brief Copy when both src and dst are interleaved and of the same type can be just memmove
157157template <typename T, typename CS>
158- BOOST_FORCEINLINE boost::gil::pixel<T,CS>*
159- copy (const boost::gil::pixel<T,CS>* first, const boost::gil::pixel<T,CS>* last,
160- boost::gil::pixel<T,CS>* dst) {
158+ BOOST_FORCEINLINE
159+ auto copy (const boost::gil::pixel<T,CS>* first, const boost::gil::pixel<T,CS>* last,
160+ boost::gil::pixel<T,CS>* dst) -> boost::gil::pixel<T,CS>*
161+ {
161162 return (boost::gil::pixel<T,CS>*)std::copy ((unsigned char *)first,(unsigned char *)last, (unsigned char *)dst);
162163}
163164} // namespace std
@@ -174,7 +175,8 @@ namespace std {
174175// / \ingroup STLOptimizations
175176// / \brief Copy when both src and dst are planar pointers is copy for each channel
176177template <typename CS, typename IC1, typename IC2> BOOST_FORCEINLINE
177- boost::gil::planar_pixel_iterator<IC2,CS> copy (boost::gil::planar_pixel_iterator<IC1,CS> first, boost::gil::planar_pixel_iterator<IC1,CS> last, boost::gil::planar_pixel_iterator<IC2,CS> dst) {
178+ auto copy (boost::gil::planar_pixel_iterator<IC1,CS> first, boost::gil::planar_pixel_iterator<IC1,CS> last, boost::gil::planar_pixel_iterator<IC2,CS> dst) -> boost::gil::planar_pixel_iterator<IC2,CS>
179+ {
178180 boost::gil::gil_function_requires<boost::gil::ChannelsCompatibleConcept<typename std::iterator_traits<IC1>::value_type,typename std::iterator_traits<IC2>::value_type>>();
179181 static_for_each (first,last,dst,boost::gil::detail::copy_fn<IC1,IC2>());
180182 return dst+(last-first);
@@ -250,7 +252,7 @@ struct copier_n<iterator_from_2d<IL>,iterator_from_2d<OL>> {
250252};
251253
252254template <typename SrcIterator, typename DstIterator>
253- BOOST_FORCEINLINE DstIterator copy_with_2d_iterators (SrcIterator first, SrcIterator last, DstIterator dst) {
255+ BOOST_FORCEINLINE auto copy_with_2d_iterators (SrcIterator first, SrcIterator last, DstIterator dst) -> DstIterator {
254256 using src_x_iterator = typename SrcIterator::x_iterator;
255257 using dst_x_iterator = typename DstIterator::x_iterator;
256258
@@ -276,9 +278,11 @@ namespace std {
276278// / \ingroup STLOptimizations
277279// / \brief std::copy(I1,I1,I2) with I1 and I2 being a iterator_from_2d
278280template <typename IL, typename OL>
279- BOOST_FORCEINLINE boost::gil::iterator_from_2d<OL> copy1 (boost::gil::iterator_from_2d<IL> first, boost::gil::iterator_from_2d<IL> last, boost::gil::iterator_from_2d<OL> dst) {
281+ BOOST_FORCEINLINE auto copy1 (boost::gil::iterator_from_2d<IL> first, boost::gil::iterator_from_2d<IL> last, boost::gil::iterator_from_2d<OL> dst) -> boost::gil::iterator_from_2d<OL>
282+ {
280283 return boost::gil::detail::copy_with_2d_iterators (first,last,dst);
281284}
285+
282286} // namespace std
283287
284288namespace boost { namespace gil {
@@ -313,13 +317,13 @@ class copy_and_convert_pixels_fn : public binary_operation_obj<copy_and_convert_
313317 copy_and_convert_pixels_fn (CC cc_in) : _cc(cc_in) {}
314318 // when the two color spaces are incompatible, a color conversion is performed
315319 template <typename V1, typename V2> BOOST_FORCEINLINE
316- result_type apply_incompatible (const V1& src, const V2& dst) const {
320+ auto apply_incompatible (const V1& src, const V2& dst) const -> result_type {
317321 copy_pixels (color_converted_view<typename V2::value_type>(src,_cc),dst);
318322 }
319323
320324 // If the two color spaces are compatible, copy_and_convert is just copy
321325 template <typename V1, typename V2> BOOST_FORCEINLINE
322- result_type apply_compatible (const V1& src, const V2& dst) const {
326+ auto apply_compatible (const V1& src, const V2& dst) const -> result_type {
323327 copy_pixels (src,dst);
324328 }
325329};
0 commit comments