|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r48958 - trunk/boost/xpressive
From: eric_at_[hidden]
Date: 2008-09-24 19:33:50
Author: eric_niebler
Date: 2008-09-24 19:33:50 EDT (Wed, 24 Sep 2008)
New Revision: 48958
URL: http://svn.boost.org/trac/boost/changeset/48958
Log:
add assert to mark_tag that mark number is greater than 0
Text files modified:
trunk/boost/xpressive/regex_primitives.hpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
Modified: trunk/boost/xpressive/regex_primitives.hpp
==============================================================================
--- trunk/boost/xpressive/regex_primitives.hpp (original)
+++ trunk/boost/xpressive/regex_primitives.hpp 2008-09-24 19:33:50 EDT (Wed, 24 Sep 2008)
@@ -12,6 +12,7 @@
#include <vector>
#include <climits>
#include <boost/config.hpp>
+#include <boost/assert.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/assert.hpp>
@@ -42,6 +43,8 @@
{
mark_tag(int mark_nbr)
{
+ // Marks numbers must be integers greater than 0.
+ BOOST_ASSERT(mark_nbr > 0);
mark_placeholder mark = {mark_nbr};
proto::arg(*this) = mark;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk