tfel
Loading...
Searching...
No Matches
IsScalar.hxx File Reference

This file declares the IsScalar traits class and specialises it for standard numeric types. More...

#include <type_traits>
#include "TFEL/Config/TFELConfig.hxx"
#include "TFEL/Math/Forward/Complex.hxx"

Classes

struct  tfel::typetraits::IsScalar< T >
 Traits class which says if its argument stands for a scalar. More...

Namespaces

namespace  tfel
 the namespace tfel encloses all the TFEL project. This namespace is empty.

Macros

#define TFEL_META_IS_SCALAR(X)
 An helper macro to specialise IsScalar for each standard "real" numeric types.

Functions

 tfel::typetraits::TFEL_META_IS_SCALAR (unsigned short)
 tfel::typetraits::TFEL_META_IS_SCALAR (unsigned int)
 tfel::typetraits::TFEL_META_IS_SCALAR (long unsigned int)
 tfel::typetraits::TFEL_META_IS_SCALAR (short)
 tfel::typetraits::TFEL_META_IS_SCALAR (int)
 tfel::typetraits::TFEL_META_IS_SCALAR (long int)
 tfel::typetraits::TFEL_META_IS_SCALAR (float)
 tfel::typetraits::TFEL_META_IS_SCALAR (double)
 tfel::typetraits::TFEL_META_IS_SCALAR (long double)
 tfel::typetraits::TFEL_META_IS_SCALAR (tfel::math::Complex< unsigned short >)
 tfel::typetraits::TFEL_META_IS_SCALAR (tfel::math::Complex< unsigned int >)
 tfel::typetraits::TFEL_META_IS_SCALAR (tfel::math::Complex< long unsigned int >)
 tfel::typetraits::TFEL_META_IS_SCALAR (tfel::math::Complex< short >)
 tfel::typetraits::TFEL_META_IS_SCALAR (tfel::math::Complex< int >)
 tfel::typetraits::TFEL_META_IS_SCALAR (tfel::math::Complex< long int >)
 tfel::typetraits::TFEL_META_IS_SCALAR (tfel::math::Complex< float >)
 tfel::typetraits::TFEL_META_IS_SCALAR (tfel::math::Complex< double >)
 tfel::typetraits::TFEL_META_IS_SCALAR (tfel::math::Complex< long double >)
template<typename T>
TFEL_HOST_DEVICE constexpr bool tfel::typetraits::isScalar ()
 a simple helper function

Detailed Description

This file declares the IsScalar traits class and specialises it for standard numeric types.

Author
Thomas Helfer
Date
07/07/2006

Macro Definition Documentation

◆ TFEL_META_IS_SCALAR

#define TFEL_META_IS_SCALAR ( X)
Value:
\
template <> \
struct IsScalar<X> { \ \
static constexpr bool cond = true; \
}; \ \
template <> \
struct IsScalar<const X> { \ \
static constexpr bool cond = true; \
}

An helper macro to specialise IsScalar for each standard "real" numeric types.

Author
Thomas Helfer
Date
28/06/2006

Function Documentation

◆ isScalar()

template<typename T>
TFEL_HOST_DEVICE constexpr bool tfel::typetraits::isScalar ( )
constexpr

a simple helper function

Template Parameters
Ttype tested