1
2// (C) Copyright Edward Diener 2011-2015
3// Use, modification and distribution are subject to the Boost Software License,
4// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt).
6
7#if !defined(BOOST_VMD_EQUAL_HPP)
8#define BOOST_VMD_EQUAL_HPP
9
10#include <boost/vmd/detail/setup.hpp>
11
12#if BOOST_PP_VARIADICS
13
14#include <boost/vmd/detail/equal.hpp>
15
16/*
17
18 The succeeding comments in this file are in doxygen format.
19
20*/
21
22/** \file
23*/
24
25/** \def BOOST_VMD_EQUAL(sequence,...)
26
27 \brief Tests any two sequences for equality.
28
29 sequence = First sequence.
30 ... = variadic parameters, maximum of 2.
31
32 The first variadic parameter is required and is the second sequence to test.
33 The optional second variadic parameter is a VMD type as a filter.
34
35 The macro tests any two sequences for equality. For sequences to be equal the
36 VMD types of each sequence must be equal and the individual elements of the
37 sequence must be equal. For Boost PP composite types the macro tests that
38 the composite types have the same size and then tests that each element
39 of the composite type is equal. This means that all elements of a composite
40 type must be a VMD type in order to use this macro successfully.
41
42 The single optional parameter is a filter. The filter is a VMD type which specifies
43 that both sequences to test must be of that VMD type, as well as being equal to
44 each other, for the test to succeed.
45
46 returns = 1 upon success or 0 upon failure. Success means that both sequences are
47 equal and, if the optional parameter is specified, that the sequences are
48 of the optional VMD type.
49
50*/
51
52#define BOOST_VMD_EQUAL(sequence,...) \
53 BOOST_VMD_DETAIL_EQUAL(sequence,__VA_ARGS__) \
54/**/
55
56/** \def BOOST_VMD_EQUAL_D(d,sequence,...)
57
58 \brief Tests any two sequences for equality. Re-entrant version.
59
60 d = The next available BOOST_PP_WHILE iteration.
61 sequence = First sequence.
62 ... = variadic parameters, maximum of 2.
63
64 The first variadic parameter is required and is the second sequence to test.
65 The optional second variadic parameter is a VMD type as a filter.
66
67 The macro tests any two sequences for equality. For sequences to be equal the
68 VMD types of each sequence must be equal and the individual elements of the
69 sequence must be equal. For Boost PP composite types the macro tests that
70 the composite types have the same size and then tests that each element
71 of the composite type is equal. This means that all elements of a composite
72 type must be a VMD type in order to use this macro successfully.
73
74 The single optional parameter is a filter. The filter is a VMD type which specifies
75 that both sequences to test must be of that VMD type, as well as being equal to
76 each other, for the test to succeed.
77
78 returns = 1 upon success or 0 upon failure. Success means that both sequences are
79 equal and, if the optional parameter is specified, that the sequences are
80 of the optional VMD type.
81
82*/
83
84#define BOOST_VMD_EQUAL_D(d,sequence,...) \
85 BOOST_VMD_DETAIL_EQUAL_D(d,sequence,__VA_ARGS__) \
86/**/
87
88#endif /* BOOST_PP_VARIADICS */
89#endif /* BOOST_VMD_EQUAL_HPP */
90

source code of boost/boost/vmd/equal.hpp