Drake
Drake C++ Documentation
Loading...
Searching...
No Matches
FromDoubleTraits Struct Reference

Detailed Description

A concrete traits class providing sugar to support for converting only from the double scalar type.

For example, if a MySystem<symbolic::Expression> cannot be converted into a MySystem<double>, it could specialize Traits as follows:

namespace drake {
namespace systems {
namespace scalar_conversion {
template <> struct Traits<MySystem> : public FromDoubleTraits {};
} // namespace scalar_conversion
} // namespace systems
} // namespace drake
Definition rimless_wheel.h:170
Definition rimless_wheel.h:169
Definition autodiff_overloads.h:161
A concrete traits class providing sugar to support for converting only from the double scalar type.
Definition scalar_conversion_traits.h:82
A templated traits class for whether an S<U> can be converted into an S<T>; the default value is true...
Definition scalar_conversion_traits.h:39

#include <drake/systems/framework/scalar_conversion_traits.h>

Public Types

template<typename T, typename U>
using supported = typename std::bool_constant<std::is_same_v<U, double>>

Member Typedef Documentation

◆ supported

template<typename T, typename U>
using supported = typename std::bool_constant<std::is_same_v<U, double>>

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