Drake
FromDoubleTraits Struct Reference

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

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

Inheritance diagram for FromDoubleTraits:
[legend]

Public Types

template<typename T , typename U >
using supported = typename std::conditional< std::is_same< U, double >::value, std::true_type, std::false_type >::type
 

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

Member Typedef Documentation

using supported = typename std::conditional< std::is_same<U, double>::value, std::true_type, std::false_type>::type

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