Drake
Traits< S > Struct Template Reference

A templated traits class for whether an S<T> can be converted into an S<U>; the default value is true for all values of S, T, and U. More...

#include <systems/framework/scalar_conversion_traits.h>

## Public Types

template<typename T , typename U >
using supported = std::true_type

## Detailed Description

### template<template< typename > class S> struct drake::systems::scalar_conversion::Traits< S >

A templated traits class for whether an S<T> can be converted into an S<U>; the default value is true for all values of S, T, and U.

Particular scalar-dependent classes may specialize this template to indicate whether the framework should support conversion for a combination of S, T, and U.

In supported cases, the "scalar-converting copy constructor" for those types will be used. That constructor takes the form of, e.g.:

template <typename T>
class Foo {
template <typename U>
explicit Foo(const Foo<U>& other);
};

In unsupported cases, the constructor will not even be mentioned by the framework, so that S need not even compile for certain values of T and U.

Template Parameters
 S is the scalar-templated type to copy

## Member Typedef Documentation

 using supported = std::true_type
Template Parameters
 T is the resulting scalar type (to convert into) U is the donor scalar type (to convert from)

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