cgal/STL_Extension/include/CGAL/tuple.h

53 lines
1.4 KiB
C++

// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 3 of the License,
// or (at your option) any later version.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0+
//
// Author(s) : Sebastien Loriot, Sylvain Pion
#ifndef CGAL_TUPLE_H
#define CGAL_TUPLE_H
# include <tuple>
namespace CGAL {
// Tool to test whether a type V is among the types of a tuple<...> = T.
template <typename V, typename T>
struct Is_in_tuple;
template <typename V, typename T0, typename... T>
struct Is_in_tuple <V, std::tuple<T0, T...> >
{
static const bool value = Is_in_tuple<V, std::tuple<T...> >::value;
};
template <typename V, typename... T>
struct Is_in_tuple <V, std::tuple<V, T...> >
{
static const bool value = true;
};
template <typename V>
struct Is_in_tuple <V, std::tuple<> >
{
static const bool value = false;
};
} //namespace CGAL
#endif // CGAL_TUPLE_H