我做了一些类似于创建一个struct
forphoenix::function
struct to_upper_impl
{
template <typename T1>
struct result { typedef std::string type; };
std::string operator()(const std::string & s) const
{
return boost::algorithm::to_upper_copy(s);
}
};
boost::phoenix::function<to_upper_impl> to_upper;
然后在我的语义操作中使用该功能。
我想知道是否可以在我的语义代码中使用某种单行代码(而不是创建结构)?
谢谢!