https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: 6c9bfde1b7b2274df8753bd067e0c1b3bc122bb2 authored by wenqing on 14 April 2023, 07:52:31 UTC
Merge branch 'stabilizer_update' into 'master'
Tip revision: 6c9bfde
Utils.h
/**
 * \file
 * \copyright
 * Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 *
 */

#pragma once

// Used to distinguish function overloads
template <typename T>
struct Type
{
};

// helper type for converting lists of types
template <typename InputList, template <typename...> typename NewListType>
struct ConvertListType;
template <template <typename...> typename OldListType, typename... Ts,
          template <typename...> typename NewListType>
struct ConvertListType<OldListType<Ts...>, NewListType>
{
    using type = NewListType<Ts...>;
};
template <typename InputList, template <typename...> typename NewListType>
using ConvertListType_t =
    typename ConvertListType<InputList, NewListType>::type;

#if __cpp_concepts >= 201907L && __cpp_lib_concepts >= 202002L
#define OGS_HAVE_CONCEPTS
#define OGS_USE_CONCEPT(name) name
#else
#define OGS_USE_CONCEPT(name) typename
#endif
back to top