is_serializable.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_BINDINGS_MARKDOWN_IS_SERIALIZABLE_HPP
13 #define MLPACK_BINDINGS_MARKDOWN_IS_SERIALIZABLE_HPP
14 
15 #include <mlpack/prereqs.hpp>
16 
17 namespace mlpack {
18 namespace bindings {
19 namespace markdown {
20 
26 template<typename T>
28  const typename std::enable_if<!data::HasSerialize<T>::value>::type* = 0)
29 {
30  return false;
31 }
32 
36 template<typename T>
38  const typename std::enable_if<data::HasSerialize<T>::value>::type* = 0,
39  const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0)
40 {
41  return true;
42 }
43 
47 template<typename T>
49  const void* /* input */,
50  void* output)
51 {
52  *((bool*) output) = IsSerializable<typename std::remove_pointer<T>::type>();
53 }
54 
55 } // namespace markdown
56 } // namespace bindings
57 } // namespace mlpack
58 
59 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:52
bool IsSerializable(const typename std::enable_if<!data::HasSerialize< T >::value >::type *=0)
Return false, because the type is not serializable.