is_serializable.hpp
Go to the documentation of this file.
1 
7 #ifndef MLPACK_BINDINGS_MARKDOWN_IS_SERIALIZABLE_HPP
8 #define MLPACK_BINDINGS_MARKDOWN_IS_SERIALIZABLE_HPP
9 
10 #include <mlpack/prereqs.hpp>
11 
12 namespace mlpack {
13 namespace bindings {
14 namespace markdown {
15 
19 template<typename T>
21  const typename boost::disable_if<data::HasSerialize<T>>::type* = 0)
22 {
23  return false;
24 }
25 
30 template<typename T>
32  const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0)
33 {
34  return false;
35 }
36 
40 template<typename T>
42  const typename boost::enable_if<data::HasSerialize<T>>::type* = 0,
43  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0)
44 {
45  return true;
46 }
47 
51 template<typename T>
52 void IsSerializable(const util::ParamData& /* data */,
53  const void* /* input */,
54  void* output)
55 {
56  *((bool*) output) = IsSerializable<typename std::remove_pointer<T>::type>();
57 }
58 
59 } // namespace markdown
60 } // namespace bindings
61 } // namespace mlpack
62 
63 #endif
.hpp
Definition: add_to_po.hpp:21
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 boost::disable_if< data::HasSerialize< T >>::type *=0)
Return false, because the type is not serializable.