diff --git a/include/boost/gil.hpp b/include/boost/gil.hpp index 890f05d8ad..6d11c2968b 100644 --- a/include/boost/gil.hpp +++ b/include/boost/gil.hpp @@ -9,7 +9,6 @@ #define boost_gil_hpp_ #include -#include #include #include #include diff --git a/include/boost/gil/algorithm.hpp b/include/boost/gil/algorithm.hpp index c7226fddff..994a5a5380 100644 --- a/include/boost/gil/algorithm.hpp +++ b/include/boost/gil/algorithm.hpp @@ -26,7 +26,6 @@ #include #include -#include "gil_config.hpp" #include "gil_concept.hpp" #include "color_base_algorithm.hpp" #include "image_view.hpp" diff --git a/include/boost/gil/bit_aligned_pixel_iterator.hpp b/include/boost/gil/bit_aligned_pixel_iterator.hpp index 6427d46cd2..984f7c1133 100644 --- a/include/boost/gil/bit_aligned_pixel_iterator.hpp +++ b/include/boost/gil/bit_aligned_pixel_iterator.hpp @@ -27,7 +27,6 @@ #include #include -#include "gil_config.hpp" #include "bit_aligned_pixel_reference.hpp" #include "pixel_iterator.hpp" diff --git a/include/boost/gil/bit_aligned_pixel_reference.hpp b/include/boost/gil/bit_aligned_pixel_reference.hpp index 219f6d5369..36b316b212 100644 --- a/include/boost/gil/bit_aligned_pixel_reference.hpp +++ b/include/boost/gil/bit_aligned_pixel_reference.hpp @@ -33,7 +33,6 @@ #include #include -#include "gil_config.hpp" #include "pixel.hpp" #include "channel.hpp" diff --git a/include/boost/gil/channel.hpp b/include/boost/gil/channel.hpp index 84ed48bf8c..9828d0fde6 100644 --- a/include/boost/gil/channel.hpp +++ b/include/boost/gil/channel.hpp @@ -1,6 +1,6 @@ /* Copyright 2005-2007 Adobe Systems Incorporated - + Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). @@ -14,7 +14,7 @@ #define GIL_CHANNEL_HPP //////////////////////////////////////////////////////////////////////////////////////// -/// \file +/// \file /// \brief Channel utilities /// \author Lubomir Bourdev and Hailin Jin \n /// Adobe Systems Incorporated @@ -24,41 +24,71 @@ /// //////////////////////////////////////////////////////////////////////////////////////// -#include -#include -#include +#include "utilities.hpp" #include +#include #include #include -#include "gil_config.hpp" -#include "utilities.hpp" +#include +#include +#include +#if defined(BOOST_GIL_DOXYGEN_ONLY) +/// \def BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS +/// \brief Define to allow unaligned memory access for models of packed channel value. +/// Theoretically (or historically?) on platforms which support dereferencing on +/// non-word memory boundary, unaligned access may result in performance improvement. +/// \warning Unfortunately, this optimization may be a C/C++ strict aliasing rules +/// violation, if accessed data buffer has effective type that cannot be aliased +/// without leading to undefined behaviour. +#define BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS +#endif -namespace boost { namespace gil { +#if defined(BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS) +#if defined(sun) || defined(__sun) || \ // SunOS + defined(__osf__) || defined(__osf) || \ // Tru64 + defined(_hpux) || defined(hpux) || \ // HP-UX + defined(__arm__) || defined(__ARM_ARCH) || \ // ARM + defined(_AIX) // AIX +#error Unaligned access strictly disabled for some UNIX platforms or ARM architecture +#elif defined(__i386__) || defined(__x86_64__) || defined(__vax__) + // The check for little-endian architectures that tolerate unaligned memory + // accesses is just an optimization. Nothing will break if it fails to detect + // a suitable architecture. + // + // Unfortunately, this optimization may be a C/C++ strict aliasing rules violation + // if accessed data buffer has effective type that cannot be aliased + // without leading to undefined behaviour. +BOOST_PRAGMA_MESSAGE("CAUTION: Unaligned access tolerated on little-endian may cause undefined behaviour") +#else +#error Unaligned access disabled for unknown platforms and architectures +#endif +#endif // defined(BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS) +namespace boost { namespace gil { /////////////////////////////////////////// //// channel_traits -//// +//// //// \ingroup ChannelModel //// \class channel_traits //// \brief defines properties of channels, such as their range and associated types //// //// The channel traits must be defined for every model of ChannelConcept //// Default traits are provided. For built-in types the default traits use -//// built-in pointer and reference and the channel range is the physical +//// built-in pointer and reference and the channel range is the physical //// range of the type. For classes, the default traits forward the associated types //// and range to the class. -//// +//// /////////////////////////////////////////// namespace detail { template struct channel_traits_impl; // channel traits for custom class - template + template struct channel_traits_impl { typedef typename T::value_type value_type; typedef typename T::reference reference; @@ -71,7 +101,7 @@ namespace detail { }; // channel traits implementation for built-in integral or floating point channel type - template + template struct channel_traits_impl { typedef T value_type; typedef T& reference; @@ -84,7 +114,7 @@ namespace detail { }; // channel traits implementation for constant built-in scalar or floating point type - template + template struct channel_traits_impl : public channel_traits_impl { typedef const T& reference; typedef const T* pointer; @@ -103,7 +133,7 @@ struct channel_traits { typedef ... pointer; typedef ... const_reference; typedef ... const_pointer; - + static const bool is_mutable; static value_type min_value(); static value_type max_value(); @@ -212,12 +242,12 @@ struct float_point_one namespace detail { // returns the smallest fast unsigned integral type that has at least NumBits bits template - struct min_fast_uint : public mpl::if_c< (NumBits<=8), - uint_least8_t, - typename mpl::if_c< (NumBits<=16), - uint_least16_t, - typename mpl::if_c< (NumBits<=32), - uint_least32_t, + struct min_fast_uint : public mpl::if_c< (NumBits<=8), + uint_least8_t, + typename mpl::if_c< (NumBits<=16), + uint_least16_t, + typename mpl::if_c< (NumBits<=32), + uint_least32_t, uintmax_t >::type >::type @@ -340,10 +370,10 @@ class packed_channel_reference_base { typedef typename detail::num_value_fn< NumBits >::type num_value_t; typedef typename detail::max_value_fn< NumBits >::type max_value_t; - + static const num_value_t num_values = static_cast< num_value_t >( 1 ) << NumBits ; static const max_value_t max_val = static_cast< max_value_t >( num_values - 1 ); - + #if defined(BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS) const bitfield_t& get_data() const { return *static_cast(_data_ptr); } void set_data(const bitfield_t& val) const { *static_cast< bitfield_t*>(_data_ptr) = val; } @@ -360,7 +390,7 @@ class packed_channel_reference_base { private: void set(integer_t value) const { // can this be done faster?? - this->derived().set_unsafe(((value % num_values) + num_values) % num_values); + this->derived().set_unsafe(((value % num_values) + num_values) % num_values); } integer_t get() const { return derived().get(); } const Derived& derived() const { return static_cast(*this); } @@ -384,19 +414,19 @@ assert(data == 6); // == 3<<1 == 6 */ template // true if the reference is mutable + int FirstBit, int NumBits,// Defines the sequence of bits in the data value that contain the channel + bool Mutable> // true if the reference is mutable class packed_channel_reference; template // true if the reference is mutable + int NumBits, // Defines the sequence of bits in the data value that contain the channel + bool Mutable> // true if the reference is mutable class packed_dynamic_channel_reference; /// \ingroup PackedChannelReferenceModel /// \brief A constant subbyte channel reference whose bit offset is fixed at compile time. Models ChannelConcept template -class packed_channel_reference +class packed_channel_reference : public detail::packed_channel_reference_base,BitField,NumBits,false> { typedef detail::packed_channel_reference_base,BitField,NumBits,false> parent_t; friend class packed_channel_reference; @@ -421,7 +451,7 @@ class packed_channel_reference /// \ingroup PackedChannelReferenceModel /// \brief A mutable subbyte channel reference whose bit offset is fixed at compile time. Models ChannelConcept template -class packed_channel_reference +class packed_channel_reference : public detail::packed_channel_reference_base,BitField,NumBits,true> { typedef detail::packed_channel_reference_base,BitField,NumBits,true> parent_t; friend class packed_channel_reference; @@ -455,7 +485,7 @@ class packed_channel_reference namespace std { // We are forced to define swap inside std namespace because on some platforms (Visual Studio 8) STL calls swap qualified. -// swap with 'left bias': +// swap with 'left bias': // - swap between proxy and anything // - swap between value type and proxy // - swap between proxy and proxy @@ -463,24 +493,23 @@ namespace std { /// \ingroup PackedChannelReferenceModel /// \brief swap for packed_channel_reference template inline -void swap(const boost::gil::packed_channel_reference x, R& y) { - boost::gil::swap_proxy::value_type>(x,y); +void swap(const boost::gil::packed_channel_reference x, R& y) { + boost::gil::swap_proxy::value_type>(x,y); } /// \ingroup PackedChannelReferenceModel /// \brief swap for packed_channel_reference template inline -void swap(typename boost::gil::packed_channel_reference::value_type& x, const boost::gil::packed_channel_reference y) { - boost::gil::swap_proxy::value_type>(x,y); +void swap(typename boost::gil::packed_channel_reference::value_type& x, const boost::gil::packed_channel_reference y) { + boost::gil::swap_proxy::value_type>(x,y); } - /// \ingroup PackedChannelReferenceModel /// \brief swap for packed_channel_reference template inline -void swap(const boost::gil::packed_channel_reference x, const boost::gil::packed_channel_reference y) { - boost::gil::swap_proxy::value_type>(x,y); +void swap(const boost::gil::packed_channel_reference x, const boost::gil::packed_channel_reference y) { + boost::gil::swap_proxy::value_type>(x,y); } } // namespace std @@ -506,7 +535,7 @@ assert(data == 6); // == (3<<1) /// \brief Models a constant subbyte channel reference whose bit offset is a runtime parameter. Models ChannelConcept /// Same as packed_channel_reference, except that the offset is a runtime parameter /// \ingroup PackedChannelDynamicReferenceModel -template +template class packed_dynamic_channel_reference : public detail::packed_channel_reference_base,BitField,NumBits,false> { typedef detail::packed_channel_reference_base,BitField,NumBits,false> parent_t; @@ -526,7 +555,7 @@ class packed_dynamic_channel_reference unsigned first_bit() const { return _first_bit; } - integer_t get() const { + integer_t get() const { const BitField channel_mask = static_cast< integer_t >( parent_t::max_val ) <<_first_bit; return static_cast< integer_t >(( this->get_data()&channel_mask ) >> _first_bit ); } @@ -535,7 +564,7 @@ class packed_dynamic_channel_reference /// \brief Models a mutable subbyte channel reference whose bit offset is a runtime parameter. Models ChannelConcept /// Same as packed_channel_reference, except that the offset is a runtime parameter /// \ingroup PackedChannelDynamicReferenceModel -template +template class packed_dynamic_channel_reference : public detail::packed_channel_reference_base,BitField,NumBits,true> { typedef detail::packed_channel_reference_base,BitField,NumBits,true> parent_t; @@ -556,26 +585,26 @@ class packed_dynamic_channel_reference const packed_dynamic_channel_reference& operator=(const const_reference& ref) const { set_unsafe(ref.get()); return *this; } template - const packed_dynamic_channel_reference& operator=(const packed_channel_reference& ref) const + const packed_dynamic_channel_reference& operator=(const packed_channel_reference& ref) const { set_unsafe(ref.get()); return *this; } unsigned first_bit() const { return _first_bit; } - integer_t get() const { + integer_t get() const { const BitField channel_mask = static_cast< integer_t >( parent_t::max_val ) << _first_bit; return static_cast< integer_t >(( this->get_data()&channel_mask ) >> _first_bit ); } - void set_unsafe(integer_t value) const { + void set_unsafe(integer_t value) const { const BitField channel_mask = static_cast< integer_t >( parent_t::max_val ) << _first_bit; - this->set_data((this->get_data() & ~channel_mask) | value<<_first_bit); + this->set_data((this->get_data() & ~channel_mask) | value<<_first_bit); } }; } } // namespace boost::gil namespace std { // We are forced to define swap inside std namespace because on some platforms (Visual Studio 8) STL calls swap qualified. -// swap with 'left bias': +// swap with 'left bias': // - swap between proxy and anything // - swap between value type and proxy // - swap between proxy and proxy @@ -584,24 +613,23 @@ namespace std { /// \ingroup PackedChannelDynamicReferenceModel /// \brief swap for packed_dynamic_channel_reference template inline -void swap(const boost::gil::packed_dynamic_channel_reference x, R& y) { - boost::gil::swap_proxy::value_type>(x,y); +void swap(const boost::gil::packed_dynamic_channel_reference x, R& y) { + boost::gil::swap_proxy::value_type>(x,y); } /// \ingroup PackedChannelDynamicReferenceModel /// \brief swap for packed_dynamic_channel_reference template inline -void swap(typename boost::gil::packed_dynamic_channel_reference::value_type& x, const boost::gil::packed_dynamic_channel_reference y) { - boost::gil::swap_proxy::value_type>(x,y); +void swap(typename boost::gil::packed_dynamic_channel_reference::value_type& x, const boost::gil::packed_dynamic_channel_reference y) { + boost::gil::swap_proxy::value_type>(x,y); } - /// \ingroup PackedChannelDynamicReferenceModel /// \brief swap for packed_dynamic_channel_reference template inline -void swap(const boost::gil::packed_dynamic_channel_reference x, const boost::gil::packed_dynamic_channel_reference y) { - boost::gil::swap_proxy::value_type>(x,y); +void swap(const boost::gil::packed_dynamic_channel_reference x, const boost::gil::packed_dynamic_channel_reference y) { + boost::gil::swap_proxy::value_type>(x,y); } } // namespace std @@ -616,7 +644,7 @@ struct is_integral struct is_integral > : public mpl::true_ {}; -template +template struct is_integral > : public is_integral {}; } // namespace boost diff --git a/include/boost/gil/channel_algorithm.hpp b/include/boost/gil/channel_algorithm.hpp index 20cc8a78ac..c03cc6bf0f 100644 --- a/include/boost/gil/channel_algorithm.hpp +++ b/include/boost/gil/channel_algorithm.hpp @@ -29,7 +29,6 @@ #include #include -#include "gil_config.hpp" #include "channel.hpp" #include "promote_integral.hpp" #include "typedefs.hpp" diff --git a/include/boost/gil/cmyk.hpp b/include/boost/gil/cmyk.hpp index 6efeeef438..9625b1a02e 100644 --- a/include/boost/gil/cmyk.hpp +++ b/include/boost/gil/cmyk.hpp @@ -27,7 +27,6 @@ #include #include -#include "gil_config.hpp" #include "metafunctions.hpp" namespace boost { namespace gil { diff --git a/include/boost/gil/color_base.hpp b/include/boost/gil/color_base.hpp index 1d43cc28ee..5fcb1b96fb 100644 --- a/include/boost/gil/color_base.hpp +++ b/include/boost/gil/color_base.hpp @@ -31,7 +31,6 @@ #include #include -#include "gil_config.hpp" #include "utilities.hpp" #include "gil_concept.hpp" diff --git a/include/boost/gil/color_base_algorithm.hpp b/include/boost/gil/color_base_algorithm.hpp index 0a9f52be5e..73f23c6856 100644 --- a/include/boost/gil/color_base_algorithm.hpp +++ b/include/boost/gil/color_base_algorithm.hpp @@ -30,7 +30,6 @@ #include #include -#include "gil_config.hpp" #include "gil_concept.hpp" #include "utilities.hpp" diff --git a/include/boost/gil/color_convert.hpp b/include/boost/gil/color_convert.hpp index 841c45f14d..b943cdbd58 100644 --- a/include/boost/gil/color_convert.hpp +++ b/include/boost/gil/color_convert.hpp @@ -28,7 +28,6 @@ #include -#include "gil_config.hpp" #include "channel_algorithm.hpp" #include "pixel.hpp" #include "gray.hpp" diff --git a/include/boost/gil/device_n.hpp b/include/boost/gil/device_n.hpp index 830f6866d4..41693dffe2 100644 --- a/include/boost/gil/device_n.hpp +++ b/include/boost/gil/device_n.hpp @@ -28,7 +28,6 @@ #include #include -#include "gil_config.hpp" #include "utilities.hpp" #include "metafunctions.hpp" diff --git a/include/boost/gil/extension/dynamic_image/apply_operation_base.hpp b/include/boost/gil/extension/dynamic_image/apply_operation_base.hpp index 2204a93b01..397a60f95a 100644 --- a/include/boost/gil/extension/dynamic_image/apply_operation_base.hpp +++ b/include/boost/gil/extension/dynamic_image/apply_operation_base.hpp @@ -13,7 +13,6 @@ #ifndef GIL_APPLY_OPERATION_BASE_HPP #define GIL_APPLY_OPERATION_BASE_HPP -#include "../../gil_config.hpp" #include "../../utilities.hpp" #include #include diff --git a/include/boost/gil/extension/dynamic_image/dynamic_at_c.hpp b/include/boost/gil/extension/dynamic_image/dynamic_at_c.hpp index 93ab5cdeb6..87e0bfcde5 100644 --- a/include/boost/gil/extension/dynamic_image/dynamic_at_c.hpp +++ b/include/boost/gil/extension/dynamic_image/dynamic_at_c.hpp @@ -13,7 +13,6 @@ #ifndef GIL_DYNAMIC_AT_C_HPP #define GIL_DYNAMIC_AT_C_HPP -#include "../../gil_config.hpp" #include #include #include diff --git a/include/boost/gil/extension/dynamic_image/variant.hpp b/include/boost/gil/extension/dynamic_image/variant.hpp index 1ab53b549d..06b39d6150 100644 --- a/include/boost/gil/extension/dynamic_image/variant.hpp +++ b/include/boost/gil/extension/dynamic_image/variant.hpp @@ -22,7 +22,6 @@ /// //////////////////////////////////////////////////////////////////////////////////////// -#include "../../gil_config.hpp" #include "../../utilities.hpp" #include #include diff --git a/include/boost/gil/extension/numeric/algorithm.hpp b/include/boost/gil/extension/numeric/algorithm.hpp index b7c175985f..de36591cb9 100644 --- a/include/boost/gil/extension/numeric/algorithm.hpp +++ b/include/boost/gil/extension/numeric/algorithm.hpp @@ -24,7 +24,6 @@ #include #include -#include #include #include diff --git a/include/boost/gil/extension/numeric/channel_numeric_operations.hpp b/include/boost/gil/extension/numeric/channel_numeric_operations.hpp index d2407f9814..4ac5fff970 100644 --- a/include/boost/gil/extension/numeric/channel_numeric_operations.hpp +++ b/include/boost/gil/extension/numeric/channel_numeric_operations.hpp @@ -27,9 +27,6 @@ #include -#include -#include - namespace boost { namespace gil { /// \ingroup ChannelNumericOperations diff --git a/include/boost/gil/extension/numeric/convolve.hpp b/include/boost/gil/extension/numeric/convolve.hpp index ba840aec71..50a0275aef 100644 --- a/include/boost/gil/extension/numeric/convolve.hpp +++ b/include/boost/gil/extension/numeric/convolve.hpp @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/include/boost/gil/extension/numeric/kernel.hpp b/include/boost/gil/extension/numeric/kernel.hpp index 012874d72a..f02ed1d1b4 100644 --- a/include/boost/gil/extension/numeric/kernel.hpp +++ b/include/boost/gil/extension/numeric/kernel.hpp @@ -26,7 +26,6 @@ #include #include -#include #include namespace boost { namespace gil { diff --git a/include/boost/gil/extension/numeric/pixel_numeric_operations.hpp b/include/boost/gil/extension/numeric/pixel_numeric_operations.hpp index 45d4c8f820..2950480943 100644 --- a/include/boost/gil/extension/numeric/pixel_numeric_operations.hpp +++ b/include/boost/gil/extension/numeric/pixel_numeric_operations.hpp @@ -26,7 +26,6 @@ #include -#include #include #include diff --git a/include/boost/gil/extension/toolbox/color_spaces/gray_alpha.hpp b/include/boost/gil/extension/toolbox/color_spaces/gray_alpha.hpp index f32a95a541..2cb80c4ae3 100644 --- a/include/boost/gil/extension/toolbox/color_spaces/gray_alpha.hpp +++ b/include/boost/gil/extension/toolbox/color_spaces/gray_alpha.hpp @@ -21,7 +21,6 @@ #include -#include #include #include #include diff --git a/include/boost/gil/extension/toolbox/dynamic_images.hpp b/include/boost/gil/extension/toolbox/dynamic_images.hpp index f0993599eb..366d98b99d 100644 --- a/include/boost/gil/extension/toolbox/dynamic_images.hpp +++ b/include/boost/gil/extension/toolbox/dynamic_images.hpp @@ -23,7 +23,6 @@ #include #include -#include #include namespace boost { namespace gil { diff --git a/include/boost/gil/gil_all.hpp b/include/boost/gil/gil_all.hpp index 17065b967f..5092d9e987 100644 --- a/include/boost/gil/gil_all.hpp +++ b/include/boost/gil/gil_all.hpp @@ -22,7 +22,6 @@ /// //////////////////////////////////////////////////////////////////////////////////////// -#include "gil_config.hpp" #include "channel_algorithm.hpp" #include "algorithm.hpp" #include "pixel.hpp" diff --git a/include/boost/gil/gil_concept.hpp b/include/boost/gil/gil_concept.hpp index 4cdbcad3ac..722ac5fd3f 100644 --- a/include/boost/gil/gil_concept.hpp +++ b/include/boost/gil/gil_concept.hpp @@ -34,8 +34,6 @@ #include #include -#include "gil_config.hpp" - namespace boost { namespace gil { #if defined(__GNUC__) && (__GNUC__ >= 4) diff --git a/include/boost/gil/gil_config.hpp b/include/boost/gil/gil_config.hpp deleted file mode 100644 index fdd39f3cdf..0000000000 --- a/include/boost/gil/gil_config.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright 2005-2007 Adobe Systems Incorporated - Copyright 2018 Mateusz Loskot - - Use, modification and distribution are subject to the Boost Software License, - Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at - http://www.boost.org/LICENSE_1_0.txt). - - See http://opensource.adobe.com/gil for most recent version including documentation. -*/ - -/*************************************************************************************************/ - -#ifndef GIL_CONFIG_HPP -#define GIL_CONFIG_HPP - -//////////////////////////////////////////////////////////////////////////////////////// -/// \file -/// \brief GIL configuration file -/// \author Lubomir Bourdev and Hailin Jin \n -/// Adobe Systems Incorporated -/// -//////////////////////////////////////////////////////////////////////////////////////// - -#include -#include - -#if defined(BOOST_GIL_DOXYGEN_ONLY) -/// \def BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS -/// \brief Define to allow unaligned memory access -/// Theoretically (or historically?) on platforms which support dereferencing on -/// non-word memory boundary, unaligned access may result in performance improvement. -/// \warning Unfortunately, this optimization may be a C/C++ strict aliasing rules -/// violation, if accessed data buffer has effective type that cannot be aliased -/// without leading to undefined behaviour. -#define BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS -#endif - -#if defined(BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS) -#if defined(sun) || defined(__sun) || \ // SunOS - defined(__osf__) || defined(__osf) || \ // Tru64 - defined(_hpux) || defined(hpux) || \ // HP-UX - defined(__arm__) || defined(__ARM_ARCH) || \ // ARM - defined(_AIX) // AIX -#error Unaligned access strictly disabled for some UNIX platforms or ARM architecture -#elif defined(__i386__) || defined(__x86_64__) || defined(__vax__) - // The check for little-endian architectures that tolerate unaligned memory - // accesses is just an optimization. Nothing will break if it fails to detect - // a suitable architecture. - // - // Unfortunately, this optimization may be a C/C++ strict aliasing rules violation - // if accessed data buffer has effective type that cannot be aliased - // without leading to undefined behaviour. -BOOST_PRAGMA_MESSAGE("CAUTION: Unaligned access tolerated on little-endian may cause undefined behaviour") -#else -#error Unaligned access disabled for unknown platforms and architectures -#endif -#endif // defined(BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS) - -#endif diff --git a/include/boost/gil/gray.hpp b/include/boost/gil/gray.hpp index 25e47ab214..89cb212c48 100644 --- a/include/boost/gil/gray.hpp +++ b/include/boost/gil/gray.hpp @@ -21,7 +21,6 @@ /// \date 2005-2007 \n Last updated on March 8, 2006 //////////////////////////////////////////////////////////////////////////////////////// -#include "gil_config.hpp" #include "utilities.hpp" #include #include diff --git a/include/boost/gil/image.hpp b/include/boost/gil/image.hpp index 577f69d4c6..7b759e955b 100644 --- a/include/boost/gil/image.hpp +++ b/include/boost/gil/image.hpp @@ -29,7 +29,6 @@ #include -#include "gil_config.hpp" #include "image_view.hpp" #include "metafunctions.hpp" #include "algorithm.hpp" diff --git a/include/boost/gil/image_view.hpp b/include/boost/gil/image_view.hpp index 53cadc2771..eb8ee4c257 100644 --- a/include/boost/gil/image_view.hpp +++ b/include/boost/gil/image_view.hpp @@ -23,7 +23,6 @@ #include #include -#include "gil_config.hpp" #include "iterator_from_2d.hpp" //#ifdef _MSC_VER diff --git a/include/boost/gil/image_view_factory.hpp b/include/boost/gil/image_view_factory.hpp index 49ef336848..2c5fe0a566 100644 --- a/include/boost/gil/image_view_factory.hpp +++ b/include/boost/gil/image_view_factory.hpp @@ -26,7 +26,6 @@ #include #include -#include "gil_config.hpp" #include "metafunctions.hpp" #include "gray.hpp" #include "color_convert.hpp" diff --git a/include/boost/gil/io/dynamic_io_new.hpp b/include/boost/gil/io/dynamic_io_new.hpp index 8ec01970eb..47632283e1 100644 --- a/include/boost/gil/io/dynamic_io_new.hpp +++ b/include/boost/gil/io/dynamic_io_new.hpp @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/include/boost/gil/iterator_from_2d.hpp b/include/boost/gil/iterator_from_2d.hpp index 767ad699d1..069598c427 100644 --- a/include/boost/gil/iterator_from_2d.hpp +++ b/include/boost/gil/iterator_from_2d.hpp @@ -24,7 +24,6 @@ #include #include #include "gil_concept.hpp" -#include "gil_config.hpp" #include "pixel_iterator.hpp" #include "locator.hpp" diff --git a/include/boost/gil/metafunctions.hpp b/include/boost/gil/metafunctions.hpp index 8e5fa5632b..8640b236cd 100644 --- a/include/boost/gil/metafunctions.hpp +++ b/include/boost/gil/metafunctions.hpp @@ -34,7 +34,6 @@ #include #include #include -#include "gil_config.hpp" #include "gil_concept.hpp" #include "channel.hpp" diff --git a/include/boost/gil/packed_pixel.hpp b/include/boost/gil/packed_pixel.hpp index 414d5dbbdf..d171ae7f80 100644 --- a/include/boost/gil/packed_pixel.hpp +++ b/include/boost/gil/packed_pixel.hpp @@ -27,7 +27,6 @@ #include #include #include -#include "gil_config.hpp" #include "pixel.hpp" namespace boost { namespace gil { diff --git a/include/boost/gil/pixel.hpp b/include/boost/gil/pixel.hpp index df48cc667a..066642ab2d 100644 --- a/include/boost/gil/pixel.hpp +++ b/include/boost/gil/pixel.hpp @@ -27,7 +27,6 @@ #include #include #include -#include "gil_config.hpp" #include "color_base.hpp" #include "gil_concept.hpp" #include "channel.hpp" diff --git a/include/boost/gil/pixel_iterator.hpp b/include/boost/gil/pixel_iterator.hpp index 0353d47668..d60d165b0e 100644 --- a/include/boost/gil/pixel_iterator.hpp +++ b/include/boost/gil/pixel_iterator.hpp @@ -24,7 +24,6 @@ #include #include -#include "gil_config.hpp" #include "gil_concept.hpp" #include "utilities.hpp" #include "pixel.hpp" diff --git a/include/boost/gil/pixel_iterator_adaptor.hpp b/include/boost/gil/pixel_iterator_adaptor.hpp index f488f5693a..2851205bdb 100644 --- a/include/boost/gil/pixel_iterator_adaptor.hpp +++ b/include/boost/gil/pixel_iterator_adaptor.hpp @@ -24,7 +24,6 @@ #include #include -#include "gil_config.hpp" #include "gil_concept.hpp" #include "pixel_iterator.hpp" diff --git a/include/boost/gil/planar_pixel_iterator.hpp b/include/boost/gil/planar_pixel_iterator.hpp index bcbf06de20..5ac10d29b5 100644 --- a/include/boost/gil/planar_pixel_iterator.hpp +++ b/include/boost/gil/planar_pixel_iterator.hpp @@ -25,7 +25,6 @@ #include #include #include -#include "gil_config.hpp" #include "pixel.hpp" #include "step_iterator.hpp" diff --git a/include/boost/gil/planar_pixel_reference.hpp b/include/boost/gil/planar_pixel_reference.hpp index 2d71842992..55f405ef63 100644 --- a/include/boost/gil/planar_pixel_reference.hpp +++ b/include/boost/gil/planar_pixel_reference.hpp @@ -23,7 +23,6 @@ //////////////////////////////////////////////////////////////////////////////////////// #include -#include "gil_config.hpp" #include "gil_concept.hpp" #include "color_base.hpp" #include "channel.hpp" diff --git a/include/boost/gil/rgb.hpp b/include/boost/gil/rgb.hpp index 64e3aca6cd..d2e6e9ea05 100644 --- a/include/boost/gil/rgb.hpp +++ b/include/boost/gil/rgb.hpp @@ -24,7 +24,6 @@ #include #include #include -#include "gil_config.hpp" #include "metafunctions.hpp" #include "planar_pixel_iterator.hpp" diff --git a/include/boost/gil/rgba.hpp b/include/boost/gil/rgba.hpp index 209d702e42..d5e20b7587 100644 --- a/include/boost/gil/rgba.hpp +++ b/include/boost/gil/rgba.hpp @@ -21,7 +21,6 @@ //////////////////////////////////////////////////////////////////////////////////////// #include -#include "gil_config.hpp" #include #include "rgb.hpp" #include "planar_pixel_iterator.hpp" diff --git a/include/boost/gil/step_iterator.hpp b/include/boost/gil/step_iterator.hpp index b62249f3c5..4903faf46c 100644 --- a/include/boost/gil/step_iterator.hpp +++ b/include/boost/gil/step_iterator.hpp @@ -25,7 +25,6 @@ #include #include #include -#include "gil_config.hpp" #include "utilities.hpp" #include "pixel_iterator.hpp" #include "pixel_iterator_adaptor.hpp" diff --git a/include/boost/gil/typedefs.hpp b/include/boost/gil/typedefs.hpp index 09797f29af..60f4b855fa 100644 --- a/include/boost/gil/typedefs.hpp +++ b/include/boost/gil/typedefs.hpp @@ -14,8 +14,6 @@ /// \author Lubomir Bourdev and Hailin Jin \n /// Adobe Systems Incorporated -#include "gil_config.hpp" - #include #include diff --git a/include/boost/gil/utilities.hpp b/include/boost/gil/utilities.hpp index 977df99839..2e804514f4 100644 --- a/include/boost/gil/utilities.hpp +++ b/include/boost/gil/utilities.hpp @@ -13,7 +13,6 @@ #ifndef GIL_UTILITIES_H #define GIL_UTILITIES_H -#include "gil_config.hpp" #include #include #include diff --git a/test/channel.cpp b/test/channel.cpp index 10620ce89b..eae2a33bca 100644 --- a/test/channel.cpp +++ b/test/channel.cpp @@ -13,8 +13,6 @@ #include #include #include -#include -#include #include #include #include