Implements the convertTo() and convertFrom() functions for conversion between different vector representations (Eigen, OpenCV, tf2 etc.).
More...
#include <experimental/type_traits>
Go to the source code of this file.
|
| mrs_lib |
| All mrs_lib functions, classes, variables and definitions are contained in this namespace.
|
|
|
#define | GENERATE_HAS_MEMBER_FUNC(func, rettype) |
|
#define | GENERATE_HAS_MEMBER(memb, type) |
|
|
using | mrs_lib::impl::unw_t = std::tuple< double, double, double > |
|
template<class T > |
using | mrs_lib::impl::_has_squarebracket_operator_chk = decltype(std::declval< T & >()[0]) |
|
|
template<typename in_t > |
std::enable_if_t< has_xfun_v< in_t >, unw_t > | mrs_lib::impl::convertFrom (const in_t &in) |
|
template<typename in_t > |
std::enable_if_t< has_xmem_v< in_t >, unw_t > | mrs_lib::impl::convertFrom (const in_t &in) |
|
template<typename in_t > |
std::enable_if_t< has_squarebracket_operator_v< in_t > &&!has_xfun_v< in_t >, unw_t > | mrs_lib::impl::convertFrom (const in_t &in) |
|
template<typename ret_t > |
std::enable_if_t< has_xyz_constructor_v< ret_t >, void > | mrs_lib::impl::convertTo (ret_t &out, const double x, const double y, const double z) |
|
template<typename ret_t > |
std::enable_if_t<!has_xyz_constructor_v< ret_t > &&has_xmem_v< ret_t >, void > | mrs_lib::impl::convertTo (ret_t &out, const double x, const double y, const double z) |
|
template<typename ret_t > |
ret_t | mrs_lib::impl::convertTo (const double x, const double y, const double z) |
|
|
template<class T > |
constexpr bool | mrs_lib::impl::has_squarebracket_operator_v = std::experimental::is_detected_convertible_v<double, _has_squarebracket_operator_chk, T> |
|
template<class T > |
constexpr bool | mrs_lib::impl::has_xyz_constructor_v = std::experimental::is_constructible_v<T, double, double, double> |
|
Implements the convertTo() and convertFrom() functions for conversion between different vector representations (Eigen, OpenCV, tf2 etc.).
- Author
- Matouš Vrba - vrbam.nosp@m.ato@.nosp@m.fel.c.nosp@m.vut..nosp@m.cz
◆ GENERATE_HAS_MEMBER
#define GENERATE_HAS_MEMBER |
( |
|
memb, |
|
|
|
type |
|
) |
| |
Value: template<class T> using _has_##memb##mem_chk = \
decltype(std::declval<T &>().memb); \
template<class T> constexpr bool has_##memb##mem_v = \
std::experimental::is_detected_convertible_v<type, _has_##memb##mem_chk, T>;
◆ GENERATE_HAS_MEMBER_FUNC
#define GENERATE_HAS_MEMBER_FUNC |
( |
|
func, |
|
|
|
rettype |
|
) |
| |
Value: template<class T> using _has_##func##fun_chk = \
decltype(std::declval<T &>().func()); \
template<class T> constexpr bool has_##func##fun_v = \
std::experimental::is_detected_convertible_v<rettype, _has_##func##fun_chk, T>;