...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Takes 2 sequences and returns a sequence containing the elements of the first followed by the elements of the second.
template< typename LhSequence, typename RhSequence> typename result_of::join<LhSequence, RhSequence>::type join(LhSequence const& lhs, RhSequence const& rhs);
Table 1.67. Parameters
Parameter |
Requirement |
Description |
---|---|---|
lhs |
A model of Forward Sequence |
Operation's argument |
rhs |
A model of Forward Sequence |
Operation's argument |
join(lhs, rhs);
Return type: A model of Forward Sequence.
Semantics: Returns a sequence containing all the elements of lhs followed by all the elements of rhs. The order of th elements is preserved.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/join.hpp> #include <boost/fusion/include/join.hpp>
vector<int,char> v1(1, 'a'); vector<int,char> v2(2, 'b'); assert(join(v1, v2) == make_vector(1,'a',2,'b'));