7 #ifndef MATIOCPP_EXOGENOUSCONVERSION_H
8 #define MATIOCPP_EXOGENOUSCONVERSION_H
19 #include <visit_struct/visit_struct_intrusive.hpp>
32 template <class Vector, typename = typename std::enable_if_t<is_vector_compatible<Vector>::value &&
84 template<typename Struct, typename = typename std::enable_if_t<visit_struct::traits::is_visitable<Struct>::value>>
96 template<
class iterator,
97 typename =
typename std::enable_if_t<is_pair_iterator_string<iterator>::value>>
109 template<
class iterator,
110 typename std::enable_if_t<is_pair_iterator_string<iterator>::value>* =
nullptr>
122 template<
class iterator,
123 typename std::enable_if_t<!is_pair<decltype(*std::declval<iterator>())>::value>* =
nullptr>
129 template <
typename Class,
typename =
void>
133 template <
typename Class>
141 template <
typename Class>
144 using type =
typename std::conditional_t<matioCpp::is_make_variable_callable<Class>::value, decltype(
matioCpp::make_variable(std::declval<std::string>(), std::declval<Class>())),
void>;
CellArray is a particular type of Variable specialized for cell arrays.
Element allows having a 1x1 variable (like double, int,..) castable to a primitive type.
Struct is a particular type of Variable specialized for structs.
Vector is a particular type of Variable specialized for 1-D arrays of a generic type T.
matioCpp::Struct make_struct(const std::string &name, iterator begin, iterator end)
Create a matioCpp::Struct starting from the begin and end iterators of a map-like container The deref...
matioCpp::CellArray make_cell_array(const std::string &name, const iterator &begin, const iterator &end)
Create a matioCpp::CellArray starting from the begin and end iterators of a container.
matioCpp::Vector< typename std::remove_cv_t< typename matioCpp::SpanUtils::container_data< Vector >::type > > make_variable(const std::string &name, const Vector &input)
Conversion from a generic vector to a matioCpp::Vector.
is_make_variable_callable is a template utility to check if the make_variable works for a give type
make_variable_output is a template utility to check the type that make_variable would output.
typename std::conditional_t< matioCpp::is_make_variable_callable< Class >::value, decltype(matioCpp::make_variable(std::declval< std::string >(), std::declval< Class >())), void > type