Files

69 lines
1.4 KiB
C++
Raw Permalink Normal View History

2002-09-15 22:13:24 +00:00
#ifndef BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED
#define BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED
2004-09-02 15:41:37 +00:00
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
2002-09-15 22:13:24 +00:00
2008-10-10 09:10:26 +00:00
// $Id$
2004-09-02 15:41:37 +00:00
// $Date$
// $Revision$
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
#include <boost/mpl/empty_fwd.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/vector/aux_/tag.hpp>
#include <boost/mpl/aux_/config/typeof.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace mpl {
#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
2002-09-15 22:13:24 +00:00
template<>
2004-09-02 15:41:37 +00:00
struct empty_impl< aux::vector_tag >
2002-09-15 22:13:24 +00:00
{
2004-09-02 15:41:37 +00:00
template< typename Vector > struct apply
: is_same<
typename Vector::lower_bound_
, typename Vector::upper_bound_
>
2002-09-15 22:13:24 +00:00
{
};
};
#else
template<>
2004-09-02 15:41:37 +00:00
struct empty_impl< aux::vector_tag<0> >
2002-09-15 22:13:24 +00:00
{
2004-09-02 15:41:37 +00:00
template< typename Vector > struct apply
2003-02-25 23:11:41 +00:00
: true_
2002-09-15 22:13:24 +00:00
{
};
};
2014-03-25 08:31:37 +00:00
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
2002-09-15 22:13:24 +00:00
template< long N >
2004-09-02 15:41:37 +00:00
struct empty_impl< aux::vector_tag<N> >
2002-09-15 22:13:24 +00:00
{
2004-09-02 15:41:37 +00:00
template< typename Vector > struct apply
2003-02-25 23:11:41 +00:00
: false_
2002-09-15 22:13:24 +00:00
{
};
};
2014-03-25 08:31:37 +00:00
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
2002-09-15 22:13:24 +00:00
2004-09-02 15:41:37 +00:00
}}
2002-09-15 22:13:24 +00:00
#endif // BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED