/*! * \file /utl/concepts/defines.h * \brief Concepts defines * * Copyright (C) 2018-2019 Christos Choutouridis * * This program is free software: 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. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * */ #ifndef __utl_concepts_defines_h__ #define __utl_concepts_defines_h__ //!\defgroup concepts //!@{ /*! * \brief * utl typename constraints wrapper * * \example * \code * template struct lala { }; * // will expand to something like: * // template struct lala { }; * // or * // template struct lala { }; * \endcode */ #if CXX_CONCEPTS #define utlConstrainType(_Concept_) _Concept_ #else #define utlConstrainType(_Concept_) typename #endif /*! \brief * utl concept keyword syntax wrapper */ #if CXX_CONCEPTS #if __cpp_concepts <= 201507L #define _utlConcept concept bool #else #define _utlConcept concept #endif #else #define _utlConcept constexpr bool #endif #ifndef CXX_LIB_INVOKE #ifdef __cpp_lib_invoke #define CXX_LIB_INVOKE __cpp_lib_invoke #else #define CXX_LIB_INVOKE 0 #endif #endif //! @} #endif /* __utl_concepts_defines_h__ */