Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73717 - trunk/boost/wave/util
From: hartmut.kaiser_at_[hidden]
Date: 2011-08-13 13:16:30


Author: hkaiser
Date: 2011-08-13 13:16:30 EDT (Sat, 13 Aug 2011)
New Revision: 73717
URL: http://svn.boost.org/trac/boost/changeset/73717

Log:
Wave: removing ancient asserts
Text files modified:
   trunk/boost/wave/util/file_position.hpp | 35 +----------------------------------
   1 files changed, 1 insertions(+), 34 deletions(-)

Modified: trunk/boost/wave/util/file_position.hpp
==============================================================================
--- trunk/boost/wave/util/file_position.hpp (original)
+++ trunk/boost/wave/util/file_position.hpp 2011-08-13 13:16:30 EDT (Sat, 13 Aug 2011)
@@ -35,36 +35,6 @@
 namespace util {
 
 ///////////////////////////////////////////////////////////////////////////////
-namespace debug {
-
- // Used only when BOOST_ASSERT expands to something
- // make sure the string literal does not contain any escapes ('\\' just
- // before '\\', '\"' or '?')
- template <typename StringT>
- inline bool
- is_escaped_lit(StringT const &value)
- {
- typename StringT::size_type pos = value.find_first_of ("\\", 0);
- if (StringT::npos != pos) {
- do {
- if ('\\' == value[pos+1] ||
- '\"' == value[pos+1] ||
- '?' == value[pos+1])
- {
- return true;
- }
- else {
- pos = value.find_first_of ("\\", pos+1);
- }
- } while (pos != StringT::npos);
- }
- return false;
- }
-
-///////////////////////////////////////////////////////////////////////////////
-} // namespace debug
-
-///////////////////////////////////////////////////////////////////////////////
 //
 // file_position
 //
@@ -85,9 +55,7 @@
     explicit file_position(string_type const& file_, std::size_t line_ = 1,
             std::size_t column_ = 1)
     : file(file_), line(line_), column(column_)
- {
- BOOST_ASSERT(!debug::is_escaped_lit(file));
- }
+ {}
 
 // accessors
     string_type const &get_file() const { return file; }
@@ -97,7 +65,6 @@
     void set_file(string_type const &file_)
     {
         file = file_;
- BOOST_ASSERT(!debug::is_escaped_lit(file));
     }
     void set_line(std::size_t line_) { line = line_; }
     void set_column(std::size_t column_) { column = column_; }


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