diff -r ./nonterminal/grammar.hpp /usr/include/boost/spirit/home/qi/nonterminal/grammar.hpp 59c59 < , std::string const& name_ = "unnamed-grammar") --- > , name_string_ref_t name_ = "unnamed-grammar") 70c70 < , std::string const& = "unnamed-grammar") --- > , name_string_ref_t = "unnamed-grammar") 80c80 < std::string name() const --- > name_string_t name() const 85c85 < void name(std::string const& str) --- > void name(name_string_ref_t str) 111c111 < std::string name_; --- > name_string_t name_; diff -r ./nonterminal/rule.hpp /usr/include/boost/spirit/home/qi/nonterminal/rule.hpp 47a48,57 > > #if defined(BOOST_SPIRIT_NAME_STRING_TYPE) && defined(BOOST_SPIRIT_NAME_STRING_CREF_TYPE) > typedef BOOST_SPIRIT_NAME_STRING_TYPE name_string_t; > typedef BOOST_SPIRIT_NAME_STRING_CREF_TYPE name_string_ref_t; > #else > typedef std::string name_string_t; > typedef name_string_t const & name_string_ref_t; > #endif > > 87c97 < : proto::extends< --- > : proto::extends< 157c167 < explicit rule(std::string const& name_ = "unnamed-rule") --- > explicit rule(name_string_ref_t name_ = "unnamed-rule") 159a170 > , f() 178a190,208 > template > static void assign_f(rule & lhs, BoundFunction const & b) > { > #if defined(BOOST_SPIRIT_ALLOCATOR_SUPPORT) && defined(BOOST_SPIRIT_ALLOCATOR_TYPE) > // assign the functor with using > lhs.f.assign(b, BOOST_SPIRIT_ALLOCATOR_TYPE()); > #else > # if defined(BOOST_SPIRIT_STATEFUL_ALLOCATOR_SUPPORT) > // With stateful allocator support check first if the optional allocator was set > if(lhs.alloc_) > lhs.f.assign(b, lhs.alloc_.get()); > else > # endif > // this is the default and it is used when the optional alloc_ is not set > lhs.f = b; > #endif > > } > 182,183c212 < lhs.f = detail::bind_parser( < compile(expr, encoding_modifier_type())); --- > assign_f(lhs, detail::bind_parser(compile(expr, encoding_modifier_type()))); 187c216 < rule(Expr const& expr, std::string const& name_ = "unnamed-rule") --- > rule(Expr const& expr, name_string_ref_t name_ = "unnamed-rule") 189a219 > , f() 207c237 < std::string const& name() const --- > name_string_ref_t name() const 212c242 < void name(std::string const& str) --- > void name(name_string_ref_t str) 385c415 < std::string name_; --- > name_string_t name_; 386a417,424 > #if defined(BOOST_SPIRIT_STATEFUL_ALLOCATOR_SUPPORT) > void alloc(BOOST_SPIRIT_ALLOCATOR_TYPE & alloc) > { > alloc_ = alloc; > } > > optional alloc_; > #endif