oss1<<f1; std::istringstream iss1(oss1.str()); Flyweight f5; iss1>>f5; BOOST_TEST(f5==f1); } } template< typename Flyweight1,typename Flyweight2, typename ForwardIterator1,typename ForwardIterator2 > void test_basic_comparison_template( ForwardIterator1 first1,ForwardIterator1 last1, ForwardIterator2 first2 BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(Flyweight1) BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(Flyweight2)) { typedef typename Flyweight1::value_type value_type1; typedef typename Flyweight2::value_type value_type2; for(;first1!=last1;++first1,++first2){ value_type1 v1=value_type1(*first1); value_type2 v2=value_type2(*first2); Flyweight1 f1(v1); Flyweight2 f2(v2); BOOST_TEST((f1==f2)==(f1.get()==v2)); BOOST_TEST((f1< f2)==(f1.get()< v2)); BOOST_TEST((f1!=f2)==(f1.get()!=v2)); BOOST_TEST((f1> f2)==(f1.get()> v2));
// PStade.Biscuit // // Copyright Shunsuke Sogame 2005-2006. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <boost/config.hpp> // for BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE #include "./is_end.hpp" namespace pstade { namespace biscuit { template< class Parser, class ForwardRange, class State, class UserState > bool state_match(ForwardRange& r, State& s, UserState& us BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(Parser)) { State tmp(r, s.results(), s.is_actionable()); Parser::parse(tmp, us); return biscuit::state_is_end(tmp); } } } // namespace pstade::biscuit #endif