40 #include <boost/mpl/assert.hpp>
45 #include <Eigen/src/StlSupport/details.h>
49 #include <type_traits>
85 template<
typename T>
struct asEnum {};
106 template<>
struct asType<detail::PointFieldTypes::FLOAT32> {
using type = float; };
107 template<>
struct asType<detail::PointFieldTypes::FLOAT64> {
using type = double; };
116 using type = std::remove_all_extents_t<T>;
121 template<
typename Po
intT>
137 template<
typename Po
intT>
138 struct POD<
Eigen::internal::workaround_msvc_stl_support<PointT> >
155 template<
class Po
intT,
typename Tag,
int dummy = 0>
156 struct name :
name<typename POD<PointT>::type, Tag, dummy>
163 POINT_TYPE_NOT_PROPERLY_REGISTERED, (
PointT&));
167 template<
class Po
intT,
typename Tag>
175 POINT_TYPE_NOT_PROPERLY_REGISTERED, (
PointT&));
179 template<
class Po
intT,
typename Tag>
189 POINT_TYPE_NOT_PROPERLY_REGISTERED, (
PointT&));
193 template<
typename Po
intT>
201 POINT_TYPE_NOT_PROPERLY_REGISTERED, (
PointT&));
218 template <
typename Po
intInT,
typename OutT>
230 const std::string &field,
233 : pt_ (reinterpret_cast<const
Pod&>(pt)), name_ (field), exists_ (exists), value_ (value)
244 const std::string &field,
246 : pt_ (reinterpret_cast<const
Pod&>(pt)), name_ (field), exists_ (exists_tmp_), value_ (value)
251 template <
typename Key>
inline void
259 value_ =
static_cast<OutT
> (*
reinterpret_cast<const T*
>(data_ptr));
265 const std::string &name_;
283 template <
typename Po
intOutT,
typename InT>
294 const std::string &field,
296 : pt_ (reinterpret_cast<
Pod&>(pt)), name_ (field), value_ (value)
301 template <
typename Key>
inline void
308 *
reinterpret_cast<T*
>(data_ptr) =
static_cast<T
> (value_);
314 const std::string &name_;
323 template <
typename Po
intT,
typename ValT>
inline void
327 *
reinterpret_cast<ValT*
>(data_ptr) = value;
335 template <
typename Po
intT,
typename ValT>
inline void
339 value = *
reinterpret_cast<const ValT*
>(data_ptr);
342 template <
typename ...>
using void_t = void;