Fusion 有尾部功能吗?

Does Fusion have a tail function?

我需要一个可以像这样使用的tail-like函数:

boost::fusion::vector<char, int, float> a('a', 12, 5.5f);
boost::fusion::vector<int, float> b(12, 5.5f);

boost::fusion::copy( Tail(a), b );

Boost Fusion, there's a section under Algorithms called Transformation. The Functions listed here notably include one called pop_front 的文档中。这似乎正是我们想要的:

Returns a new sequence, with the first element of the original removed.
...

Example

assert(pop_front(make_vector(1,2,3)) == make_vector(2,3));

举个例子:

boost::fusion::vector<char, int, float> a('a', 12, 5.5f);
boost::fusion::vector<int, float> b(12, 5.5f);

boost::fusion::copy( boost::fusion::pop_front(a), b );

这个名字pop_front有点奇怪,考虑到它实际上并没有修改输入序列,而是returns一个修改后的结果。但是,pop_front 来自 C++ 标准库,它用于删除集合的第一个元素,例如 std::list::pop_front。 Boost Fusion 选择此名称与标准库"more consistent"。