0000004c
 –    ‹      ¥’ßoÓ0Çß÷W~à­9¦•æ�¤•º¶ê‚Ð4ñàÚNbáÆ‘},Œ¿§)Ú�6âÉ¿>÷½ûž�¿*7Eu»]ÀÇêzÛOVËØñóE�XVåô0ÏÞœ#.ÖXKÔ¿C†!.2¬vØÒÁÍ1R°Š2Mš‰3>Þ‰3à­‘:­ÀÉ’3bÙió|è¿Q´ÚÌ±^!µ!�³h\�Á{Â{PIÕtÞ»!jŽ“BÒÄ“(ß{ý0æ:ÿ/Ý~,Pî�òã6N-ÜKg›.gä{&¸=4ƒÊZå»ˆ{'»¯YckÒQÎî–ÅæKâRÎ1Zp	)y�³÷E¾¾Üä%ky0åóÌub®˜XÉHpðÚÖÖèá›	¾±?^,'¦4QÛ“õÝ#ŠÉâS«Ê»ØËäõmrÐ†§Ô„è?uCªßš±½Ú-ÖU¹ÜM-Ñ£ÄcuÿKLle0AiƒQäÃÃÉÄ¤øºÛÇþò×N%Û´ÄÀž%ÿÅ=žæ‚ãqÚ8N“ý¡d/z<    C   ˆl–Ãa¾”êh¥2 ¸&®6â˜´o�þ]~A,Ü¤’¸Æ ùÆ„d!yÏÅ_‹I|¥�+ýÿ¹ä³ÅÄ ?÷     //
// Copyright 2005-2007 Adobe Systems Incorporated
//
// Distributed under 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
//
#ifndef BOOST_GIL_METAFUNCTIONS_HPP
#define BOOST_GIL_METAFUNCTIONS_HPP

#include <boost/gil/channel.hpp>
#include <boost/gil/dynamic_step.hpp>
#include <boost/gil/concepts.hpp>
#include <boost/gil/concepts/detail/type_traits.hpp>
#include <boost/gil/detail/mp11.hpp>

#include <iterator>
#include <type_traits>

namespace boost { namespace gil {

// forward declarations
template <typename T, typename L> struct pixel;
template <typename BitField,typename ChannelRefs,typename Layout> struct packed_pixel;
template <typename T, typename C> struct planar_pixel_reference;
template <typename IC, typename C> struct planar_pixel_iterator;
template <typename I> class memory_based_step_iterator;
template <typename I> class memory_based_2d_locator;
template <typename L> class image_view;
template <typename Pixel, bool IsPlanar, typename Alloc> class image;
template <typename T> struct channel_type;
template <typename T> struct color_space_type;
template <typename T> struct channel_mapping_type;
template <typename It> struct is_iterator_adaptor;
template <typename It> struct iterator_adaptor_get_base;
template <typename BitField, typename ChannelBitSizes, typename Layout, bool IsMutable> struct bit_aligned_pixel_reference;

//////////////////////////////////////////////////
///
///  TYPE ANALYSIS METAFUNCTIONS
///  Predicate metafunctions determining properties of GIL types
///
//////////////////////////////////////////////////


/// \defgroup GILIsBasic xxx_is_basic
/// \ingroup TypeAnalysis
/// \brief Determines if GIL constructs are basic.
///    Basic constructs are the ones that can be generated with the type
///    factory methods pixel_reference_type, iterator_type, locator_type, view_type and image_type
///    They can be mutable/immutable, planar/interleaved, step/nonstep. They must use GIL-provided models.

/// \brief Determines if a given pixel reference is basic
///    Basic references must use gil::pixel& (if interleaved), gil::planar_pixel_reference (if planar). They must use the standard constness rules.
/// \ingroup GILIsBasic
template <typename PixelRef>
struct pixel_reference_is_basic : public std::false_type {};

template <typename T, typename L>
struct pixel_reference_is_basic<pixel<T, L>&> : std::true_type {};

template <typename T, typename L>
struct pixel_reference_is_basic<const pixel<T, L>&> : std::true_type {};

template <typename TR, typename CS>
struct pixel_reference_is_basic<planar_pixel_reference<TR, CS>> : std::true_type {};

template <typename TR, typename CS>
struct pixel_reference_is_basic<const planar_pixel_reference<TR, CS>> : std::true_type {};

/// \brief Determines if a given pixel iterator is basic
///    Basic iterators must use gil::pixel (if interleaved), gil::planar_pixel_iterator (if planar) and gil::memory_based_step_iterator (if step). They must use the standard constness rules.
/// \ingroup GILIsBasic
template <typename Iterator>
struct iterator_is_basic : std::false_type {};

/// \tparam T mutable interleaved pixel type
template <typename T, typename L>
struct iterator_is_basic<pixel<T, L>*> : std::true_type {};

/// \tparam T immutable interleaved pixel type
template <typename T, typename L>
struct iterator_is_basic<pixel<T, L> const*> : std::true_type {};

/// \tparam T mutable planar pixel type
template <typename T, typename CS>
struct iterator_is_basic<planar_pixel_iterator<