Update of /cvsroot/boost/boost/boost/xpressive/detail/utility/chset
In directory
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23448/boost/xpressive/detail/utility/chset
Modified Files:
basic_chset.hpp range_run.ipp
Log Message:
hooray, non-char data works\!
Index: basic_chset.hpp
===================================================================
RCS file:
/cvsroot/boost/boost/boost/xpressive/detail/utility/chset/basic_chset.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- basic_chset.hpp 21 Dec 2006 03:51:41 -0000 1.4
+++ basic_chset.hpp 30 May 2007 19:40:10 -0000 1.5
@@ -135,6 +135,28 @@
#endif
///////////////////////////////////////////////////////////////////////////////
+// is_narrow_char
+template<typename Char>
+struct is_narrow_char
+ : mpl::false_
+{};
+
+template<>
+struct is_narrow_char<char>
+ : mpl::true_
+{};
+
+template<>
+struct is_narrow_char<signed char>
+ : mpl::true_
+{};
+
+template<>
+struct is_narrow_char<unsigned char>
+ : mpl::true_
+{};
+
+///////////////////////////////////////////////////////////////////////////////
// helpers
template<typename Char, typename Traits>
void set_char(basic_chset<Char> &chset, Char ch, Traits const &traits, bool
icase);
Index: range_run.ipp
===================================================================
RCS file:
/cvsroot/boost/boost/boost/xpressive/detail/utility/chset/range_run.ipp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- range_run.ipp 30 May 2007 08:34:03 -0000 1.4
+++ range_run.ipp 30 May 2007 19:40:11 -0000 1.5
@@ -56,10 +56,8 @@
template<typename Char>
inline bool range<Char>::overlaps(range<Char> const &r) const
{
- Char decr_first =
- this->first_ == (std::numeric_limits<Char>::min)() ? this->first_ :
Char(this->first_-1);
- Char incr_last =
- this->last_ == (std::numeric_limits<Char>::max)() ? this->last_ :
Char(this->last_+1);
+ Char decr_first = (std::min)(this->first_, Char(this->first_-1));
+ Char incr_last = (std::max)(this->last_, Char(this->last_+1));
return (decr_first <= r.last_) && (incr_last >= r.first_);
}
-------------------------------------------------------------------------
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