$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r68138 - sandbox/gil/boost/gil/extension/io2
From: dsaritz_at_[hidden]
Date: 2011-01-13 19:38:32
Author: psiha
Date: 2011-01-13 19:38:19 EST (Thu, 13 Jan 2011)
New Revision: 68138
URL: http://svn.boost.org/trac/boost/changeset/68138
Log:
Minor refactoring.
Text files modified: 
   sandbox/gil/boost/gil/extension/io2/formatted_image.hpp |    11 ++++++++++-                             
   1 files changed, 10 insertions(+), 1 deletions(-)
Modified: sandbox/gil/boost/gil/extension/io2/formatted_image.hpp
==============================================================================
--- sandbox/gil/boost/gil/extension/io2/formatted_image.hpp	(original)
+++ sandbox/gil/boost/gil/extension/io2/formatted_image.hpp	2011-01-13 19:38:19 EST (Thu, 13 Jan 2011)
@@ -909,7 +909,16 @@
     template <class Target, class View>
     static void write( Target & target, View const & view )
     {
-        typedef typename writer_for<typename decay<Target>::type>::type writer_t;
+        // decay array to const pointer
+        //...zzz...to add automatic support for char */char[] targets...clean this up...
+        typedef typename decay<Target>::type decayed_target_t;
+        typedef typename mpl::if_
+        <
+            is_pointer<decayed_target_t>,
+            typename remove_pointer<decayed_target_t>::type const *,
+            decayed_target_t
+        >::type target_t;
+        typedef typename writer_for<target_t>::type writer_t;
         // The backend does not know how to write to the specified target type.
         BOOST_STATIC_ASSERT(( !is_same<writer_t, mpl::void_>::value ));
         writer_t( target, view ).write_default();