Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48720 - trunk/libs/proto/test
From: eric_at_[hidden]
Date: 2008-09-11 00:11:22


Author: eric_niebler
Date: 2008-09-11 00:11:21 EDT (Thu, 11 Sep 2008)
New Revision: 48720
URL: http://svn.boost.org/trac/boost/changeset/48720

Log:
attempt to work around hp acc bug
Text files modified:
   trunk/libs/proto/test/matches.cpp | 14 +++++++++++---
   1 files changed, 11 insertions(+), 3 deletions(-)

Modified: trunk/libs/proto/test/matches.cpp
==============================================================================
--- trunk/libs/proto/test/matches.cpp (original)
+++ trunk/libs/proto/test/matches.cpp 2008-09-11 00:11:21 EDT (Thu, 11 Sep 2008)
@@ -7,6 +7,8 @@
 
 #include <string>
 #include <iostream>
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
 #include <boost/mpl/assert.hpp>
 #include <boost/mpl/placeholders.hpp>
 #include <boost/type_traits/is_same.hpp>
@@ -184,9 +186,15 @@
     assert_not_matches< terminal<std::basic_string<_,_,_> > >( as_child(1) );
     assert_not_matches< terminal<std::basic_string<_,_,_> > >( as_expr(1) );
 
- assert_matches< terminal<std::basic_string<_> const & > >( lit(std::string("hello")) );
- assert_matches< terminal<std::basic_string<_> const & > >( as_child(std::string("hello")) );
- assert_not_matches< terminal<std::basic_string<_> const & > >( as_expr(std::string("hello")) );
+ #if BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(61700))
+ typedef std::string const const_string;
+ #else
+ typedef std::string const_string;
+ #endif
+
+ assert_matches< terminal<std::basic_string<_> const & > >( lit(const_string("hello")) );
+ assert_matches< terminal<std::basic_string<_> const & > >( as_child(const_string("hello")) );
+ assert_not_matches< terminal<std::basic_string<_> const & > >( as_expr(const_string("hello")) );
 
     assert_matches< terminal< void(&)() > >( lit(a_function) );
     assert_matches< terminal< void(&)() > >( as_child(a_function) );


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