Fusion pair type is a half
runtime pair. A half runtime pair is similar to a std::pair,
but, unlike std::pair,
the first type does not have data. It is used as elements in _map_s,
for example.
template <typename First, typename Second>
struct pair;
namespace result_of
{
template <typename First, typename Second>
struct first;
template <typename First, typename Second>
struct second;
template <typename First, typename Second>
struct make_pair;
}
template <typename First, typename Second>
typename result_of::make_pair<First,Second>::type
make_pair(Second const &);
Notation
- P
-
Fusion pair type
- p,
p2
-
Fusion pairs
- F,
S
-
Arbitrary types
- s
-
Value of type S
- o
-
Output stream
- i
-
Input stream
#include <boost/fusion/support/pair.hpp>
pair<int, char> p('X');
std::cout << p << std::endl;
std::cout << make_pair<int>('X') << std::endl;
assert((p == make_pair<int>('X')));