PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/fusion/sequence/comparison/enable_comparison.hpp

http://hadesmem.googlecode.com/
C++ Header | 34 lines | 24 code | 4 blank | 6 comment | 0 complexity | 85d3d68fe5e211aabe62ebb8e4084f09 MD5 | raw file
 1/*=============================================================================
 2    Copyright (c) 2001-2006 Joel de Guzman
 3
 4    Distributed under the Boost Software License, Version 1.0. (See accompanying
 5    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 6==============================================================================*/
 7#if !defined(FUSION_ENABLE_COMPARISON_09232005_1958)
 8#define FUSION_ENABLE_COMPARISON_09232005_1958
 9
10#include <boost/mpl/or.hpp>
11#include <boost/mpl/and.hpp>
12#include <boost/mpl/not.hpp>
13#include <boost/mpl/equal_to.hpp>
14#include <boost/fusion/support/sequence_base.hpp>
15#include <boost/fusion/support/is_sequence.hpp>
16#include <boost/fusion/sequence/intrinsic/size.hpp>
17
18namespace boost { namespace fusion { namespace traits
19{
20    template <typename Seq1, typename Seq2, typename Enable = void>
21    struct enable_equality
22        : mpl::or_<traits::is_sequence<Seq1>, traits::is_sequence<Seq2> >
23    {};
24
25    template <typename Seq1, typename Seq2, typename Enable = void>
26    struct enable_comparison
27        : mpl::and_<
28            mpl::or_<traits::is_sequence<Seq1>, traits::is_sequence<Seq2> >
29          , mpl::equal_to<result_of::size<Seq1>, result_of::size<Seq2> >
30        >
31    {};
32}}}
33
34#endif