File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ namespace seq
240240 if constexpr (!is_formattable<T>::value)
241241 throw seq::bad_any_function_call (" data type is not formattable" );
242242 else if constexpr (std::is_pointer_v<T>) {
243- auto f = fmt (static_cast <const void *>(*static_cast <const T*>(in))); // TEST
243+ auto f = fmt (reinterpret_cast <const void *>(*static_cast <const T*>(in))); // TEST
244244 f.set_width_format (wfmt);
245245 f.set_numeric_format (nfmt);
246246 f.append (out);
@@ -493,7 +493,10 @@ namespace seq
493493 template <class T >
494494 SEQ_ALWAYS_INLINE typename std::enable_if<is_less_comparable<T>::value, bool >::type compare_less_any (const void * a, const void * b)
495495 {
496- return *static_cast <const T*>(a) < *static_cast <const T*>(b);
496+ if constexpr (std::is_pointer_v<T>)
497+ return reinterpret_cast <const void *>(*static_cast <const T*>(a)) < reinterpret_cast <const void *>(*static_cast <const T*>(b));
498+ else
499+ return *static_cast <const T*>(a) < *static_cast <const T*>(b);
497500 }
498501 template <class T >
499502 SEQ_ALWAYS_INLINE typename std::enable_if<!is_less_comparable<T>::value, bool >::type compare_less_any (const void *, const void *)
You can’t perform that action at this time.
0 commit comments