JeVoisBase  1.5
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
convert_helper< dst_type, src_type, is_preserving, dst_type_is_integer > Struct Template Reference

Helper struct to handle type conversions at compile time. More...

#include <jevoisbase/Components/RoadFinder/Promotions.H>

Detailed Description

template<class dst_type, class src_type, bool is_preserving = promoteFromTo<src_type, dst_type>::is_preserving, bool dst_type_is_integer = std::numeric_limits<dst_type>::is_integer>
struct convert_helper< dst_type, src_type, is_preserving, dst_type_is_integer >

Helper struct to handle type conversions at compile time.

Helps decide whether to clamp or not at compile time so that we don't waste time in a test at run time; because std::numeric_limits is a pile of trash, we also need to parameterize the helper by a boolean indicating whether the type we convert to is integer or not. This will determine which numeric limits we use to do the clamping:

Definition at line 247 of file Promotions.H.


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