Drake
is_numeric< T > Struct Template Reference

is_numeric is true for types that are on the real line. More...

#include <drake/common/number_traits.h>

Collaboration diagram for is_numeric< T >:
[legend]

Static Public Attributes

static constexpr bool value = true
 

Detailed Description

template<typename T>
struct drake::is_numeric< T >

is_numeric is true for types that are on the real line.

The exact list of operations that Drake requires numeric types to satisfy is not yet a hard API commitment; we expect it to expand slowly over time. However, it will only include operations that real numbers can implement.

By default, is_numeric is true. It should be specialized to false as needed to avoid compiling Drake features that don't make sense for non-real types.

Examples:

is_numeric should be true for types like double, int, and AutoDiffScalar.

is_numeric should be false for types like std::complex, Polynomial, and symbolic::Expression.

Member Data Documentation

constexpr bool value = true
static

The documentation for this struct was generated from the following file: