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_NOT_EQUAL_HPP) 8 #define BOOST_VMD_NOT_EQUAL_HPP 9 10 #include <boost/vmd/detail/setup.hpp> 11 12 #if BOOST_PP_VARIADICS 13 14 #include <boost/preprocessor/logical/compl.hpp> 15 #include <boost/vmd/equal.hpp> 16 17 /* 18 19 The succeeding comments in this file are in doxygen format. 20 21 */ 22 23 /** \file 24 */ 25 26 /** \def BOOST_VMD_NOT_EQUAL(sequence,...) 27 28 \brief Tests any two sequences for inequality. 29 30 sequence = First sequence. <br/> 31 ... = variadic parameters, maximum of 2. 32 33 The first variadic parameter is required and is the second sequence to test. 34 The optional second variadic parameter is a VMD type as a filter. 35 36 The macro tests any two sequences for inequality. For sequences to be unequal 37 either the VMD types of each sequence must be unequal or the individual elements of the 38 sequence must be unequal. 39 40 The single optional parameter is a filter. The filter is a VMD type which specifies 41 that both sequences to test must be of that VMD type, as well as being equal to 42 each other, for the test to fail, else it succeeds. 43 44 returns = 1 upon success or 0 upon failure. Success means that the sequences are 45 unequal or, if the optional parameter is specified, that the sequences are 46 not of the optional VMD type; otherwise 0 is returned if the sequences 47 are equal. 48 49 The macro is implemented as the complement of BOOST_VMD_EQUAL, so that whenever 50 BOOST_VMD_EQUAL would return 1 the macro returns 0 and whenever BOOST_VMD_EQUAL 51 would return 0 the macro would return 1. 52 53 */ 54 55 #define BOOST_VMD_NOT_EQUAL(sequence,...) \ 56 BOOST_PP_COMPL(BOOST_VMD_EQUAL(sequence,__VA_ARGS__)) \ 57 /**/ 58 59 /** \def BOOST_VMD_NOT_EQUAL_D(d,sequence,...) 60 61 \brief Tests any two sequences for inequality. Re-entrant version. 62 63 d = The next available BOOST_PP_WHILE iteration. <br/> 64 sequence = First sequence. <br/> 65 ... = variadic parameters, maximum of 2. 66 67 The first variadic parameter is required and is the second sequence to test. 68 The optional second variadic parameter is a VMD type as a filter. 69 70 The macro tests any two sequences for inequality. For sequences to be unequal 71 either the VMD types of each sequence must be unequal or the individual elements of the 72 sequence must be unequal. 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 fail, else it succeeds. 77 78 returns = 1 upon success or 0 upon failure. Success means that the sequences are 79 unequal or, if the optional parameter is specified, that the sequences are 80 not of the optional VMD type; otherwise 0 is returned if the sequences 81 are equal. 82 83 The macro is implemented as the complement of BOOST_VMD_EQUAL, so that whenever 84 BOOST_VMD_EQUAL would return 1 the macro returns 0 and whenever BOOST_VMD_EQUAL 85 would return 0 the macro would return 1. 86 87 */ 88 89 #define BOOST_VMD_NOT_EQUAL_D(d,sequence,...) \ 90 BOOST_PP_COMPL(BOOST_VMD_EQUAL_D(d,sequence,__VA_ARGS__)) \ 91 /**/ 92 93 #endif /* BOOST_PP_VARIADICS */ 94 #endif /* BOOST_VMD_NOT_EQUAL_HPP */ 95