Update of /cvsroot/boost/boost/boost/xpressive/detail/static
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9491/detail/static

Modified Files:
        width_of.hpp 
Log Message:
fix non-char array with calculation

Index: width_of.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/detail/static/width_of.hpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- width_of.hpp        31 May 2007 18:51:51 -0000      1.22
+++ width_of.hpp        31 May 2007 19:36:50 -0000      1.23
@@ -27,6 +27,23 @@
 
 namespace boost { namespace xpressive { namespace detail
 {
+    
///////////////////////////////////////////////////////////////////////////////
+    // is_char
+    //
+    template<typename T>
+    struct is_char
+      : mpl::false_
+    {};
+
+    template<>
+    struct is_char<char>
+      : mpl::true_
+    {};
+
+    template<>
+    struct is_char<wchar_t>
+      : mpl::true_
+    {};
 
     
///////////////////////////////////////////////////////////////////////////////
     // width_of_terminal
@@ -58,12 +75,12 @@
 
     template<typename Elem, std::size_t N, typename Char>
     struct width_of_terminal<Elem (&) [N], Char, false>
-      : mpl::size_t<N-1>    // string literals
+      : mpl::size_t<N-is_char<Elem>::value>    // string literals
     {};
 
     template<typename Elem, std::size_t N, typename Char>
     struct width_of_terminal<Elem const (&) [N], Char, false>
-      : mpl::size_t<N-1>    // string literals
+      : mpl::size_t<N-is_char<Elem>::value>    // string literals
     {};
 
     
///////////////////////////////////////////////////////////////////////////////


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to