From fe7bfbbb789b9fe14be35822ea674fe875eb0c2c Mon Sep 17 00:00:00 2001 From: Omar Shrit Date: Sun, 27 Jun 2021 16:57:27 +0200 Subject: [PATCH] Python Binding now... Signed-off-by: Omar Shrit --- src/mlpack/bindings/python/default_param.hpp | 24 +++--- .../bindings/python/default_param_impl.hpp | 22 ++--- .../bindings/python/get_cython_type.hpp | 44 +++++----- .../bindings/python/get_printable_param.hpp | 22 ++--- .../bindings/python/get_printable_type.hpp | 84 +++++++++---------- .../python/get_printable_type_impl.hpp | 84 +++++++++---------- src/mlpack/bindings/python/import_decl.hpp | 10 +-- .../bindings/python/print_class_defn.hpp | 10 +-- .../python/print_input_processing.hpp | 36 ++++---- .../python/print_output_processing.hpp | 18 ++-- src/mlpack/bindings/python/print_type_doc.hpp | 14 ++-- .../bindings/python/print_type_doc_impl.hpp | 14 ++-- 12 files changed, 191 insertions(+), 191 deletions(-) diff --git a/src/mlpack/bindings/python/default_param.hpp b/src/mlpack/bindings/python/default_param.hpp index 15504a74b4..36a6b19c32 100644 --- a/src/mlpack/bindings/python/default_param.hpp +++ b/src/mlpack/bindings/python/default_param.hpp @@ -26,12 +26,12 @@ namespace python { template std::string DefaultParamImpl( util::ParamData& data, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>>::type* = 0); + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if>::value>::type* = 0); /** * Return the default value of a vector option. @@ -39,7 +39,7 @@ std::string DefaultParamImpl( template std::string DefaultParamImpl( util::ParamData& data, - const typename boost::enable_if>::type* = 0); + const typename std::enable_if::value>::type* = 0); /** * Return the default value of a string option. @@ -47,7 +47,7 @@ std::string DefaultParamImpl( template std::string DefaultParamImpl( util::ParamData& data, - const typename boost::enable_if>::type* = 0); + const typename std::enable_if::value>::type* = 0); /** * Return the default value of a matrix option, a tuple option, a @@ -57,10 +57,10 @@ std::string DefaultParamImpl( template std::string DefaultParamImpl( util::ParamData& data, - const typename boost::enable_if_c< + const typename std::enable_if< arma::is_arma_type::value || std::is_same>::value>::type* /* junk */ = 0); + arma::mat>>::value>::type* = 0); /** * Return the default value of a model option (this returns the default @@ -69,8 +69,8 @@ std::string DefaultParamImpl( template std::string DefaultParamImpl( util::ParamData& data, - const typename boost::disable_if>::type* = 0, - const typename boost::enable_if>::type* = 0); + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0); /** * Return the default value of an option. This is the function that will be diff --git a/src/mlpack/bindings/python/default_param_impl.hpp b/src/mlpack/bindings/python/default_param_impl.hpp index 15c7f344ae..d953c2efb2 100644 --- a/src/mlpack/bindings/python/default_param_impl.hpp +++ b/src/mlpack/bindings/python/default_param_impl.hpp @@ -24,12 +24,12 @@ namespace python { template std::string DefaultParamImpl( util::ParamData& data, - const typename boost::disable_if>::type* /* junk */, - const typename boost::disable_if>::type* /* junk */, - const typename boost::disable_if>::type* /* junk */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>>::type* /* junk */) + const typename std::enable_if::value>::type* /* junk */, + const typename std::enable_if::value>::type* /* junk */, + const typename std::enable_if::value>::type* /* junk */, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type* /* junk */) { std::ostringstream oss; if (std::is_same::value) @@ -46,7 +46,7 @@ std::string DefaultParamImpl( template std::string DefaultParamImpl( util::ParamData& data, - const typename boost::enable_if>::type* /* junk */) + const typename std::enable_if::value>::type* /* junk */) { // Print each element in an array delimited by square brackets. std::ostringstream oss; @@ -89,7 +89,7 @@ std::string DefaultParamImpl( template std::string DefaultParamImpl( util::ParamData& data, - const typename boost::enable_if>::type*) + const typename std::enable_if::value>::type*) { const std::string& s = *boost::any_cast(&data.value); return "'" + s + "'"; @@ -102,7 +102,7 @@ std::string DefaultParamImpl( template std::string DefaultParamImpl( util::ParamData& /* data */, - const typename boost::enable_if_c< + const typename std::enable_if< arma::is_arma_type::value || std::is_same>::value>::type* /* junk */) @@ -134,8 +134,8 @@ std::string DefaultParamImpl( template std::string DefaultParamImpl( util::ParamData& /* data */, - const typename boost::disable_if>::type* /* junk */, - const typename boost::enable_if>::type* /* junk */) + const typename std::enable_if::value>::type* /* junk */, + const typename std::enable_if::value>::type* /* junk */) { return "None"; } diff --git a/src/mlpack/bindings/python/get_cython_type.hpp b/src/mlpack/bindings/python/get_cython_type.hpp index bb01da538e..705b785758 100644 --- a/src/mlpack/bindings/python/get_cython_type.hpp +++ b/src/mlpack/bindings/python/get_cython_type.hpp @@ -23,9 +23,9 @@ namespace python { template inline std::string GetCythonType( util::ParamData& /* d */, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0) { return "unknown"; } @@ -33,9 +33,9 @@ inline std::string GetCythonType( template<> inline std::string GetCythonType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*) { return "int"; } @@ -43,9 +43,9 @@ inline std::string GetCythonType( template<> inline std::string GetCythonType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*) { return "double"; } @@ -53,9 +53,9 @@ inline std::string GetCythonType( template<> inline std::string GetCythonType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*) { return "string"; } @@ -63,9 +63,9 @@ inline std::string GetCythonType( template<> inline std::string GetCythonType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*) { return "size_t"; } @@ -73,9 +73,9 @@ inline std::string GetCythonType( template<> inline std::string GetCythonType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*) { return "cbool"; } @@ -83,7 +83,7 @@ inline std::string GetCythonType( template inline std::string GetCythonType( util::ParamData& d, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0) { return "vector[" + GetCythonType(d) + "]"; } @@ -91,7 +91,7 @@ inline std::string GetCythonType( template inline std::string GetCythonType( util::ParamData& d, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0) { std::string type = "Mat"; if (T::is_row) @@ -105,8 +105,8 @@ inline std::string GetCythonType( template inline std::string GetCythonType( util::ParamData& d, - const typename boost::disable_if>::type* = 0, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0) { return d.cppType + "*"; } diff --git a/src/mlpack/bindings/python/get_printable_param.hpp b/src/mlpack/bindings/python/get_printable_param.hpp index effdf4f07b..44ab825687 100644 --- a/src/mlpack/bindings/python/get_printable_param.hpp +++ b/src/mlpack/bindings/python/get_printable_param.hpp @@ -25,11 +25,11 @@ namespace python { template std::string GetPrintableParam( util::ParamData& data, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if>::value>::type* = 0) { std::ostringstream oss; oss << boost::any_cast(data.value); @@ -42,7 +42,7 @@ std::string GetPrintableParam( template std::string GetPrintableParam( util::ParamData& data, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0) { const T& t = boost::any_cast(data.value); @@ -58,7 +58,7 @@ std::string GetPrintableParam( template std::string GetPrintableParam( util::ParamData& data, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0) { // Get the matrix. const T& matrix = boost::any_cast(data.value); @@ -74,8 +74,8 @@ std::string GetPrintableParam( template std::string GetPrintableParam( util::ParamData& data, - const typename boost::disable_if>::type* = 0, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0) { std::ostringstream oss; oss << data.cppType << " model at " << boost::any_cast(data.value); @@ -88,8 +88,8 @@ std::string GetPrintableParam( template std::string GetPrintableParam( util::ParamData& data, - const typename boost::enable_if>>::type* = 0) + const typename std::enable_if>::value>::type* = 0) { // Get the matrix. const T& tuple = boost::any_cast(data.value); diff --git a/src/mlpack/bindings/python/get_printable_type.hpp b/src/mlpack/bindings/python/get_printable_type.hpp index 2b7cfb40ed..41593e4681 100644 --- a/src/mlpack/bindings/python/get_printable_type.hpp +++ b/src/mlpack/bindings/python/get_printable_type.hpp @@ -23,84 +23,84 @@ namespace python { template inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>>::type* = 0); + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if>::value>::type* = 0); template<> inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>>::type*); + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*); template<> inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>>::type*); + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*); template<> inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>>::type*); + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*); template<> inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>>::type*); + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*); template<> inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>>::type*); + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*); template inline std::string GetPrintableType( util::ParamData& d, - const typename boost::enable_if>::type* = 0, - const typename boost::disable_if>>::type* = 0); + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if>::value>::type* = 0); template inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::enable_if>::type* = 0, - const typename boost::disable_if>>::type* = 0); + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if>::value>::type* = 0); template inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::enable_if>>::type* = 0); + const typename std::enable_if>::value>::type* = 0); template inline std::string GetPrintableType( util::ParamData& d, - const typename boost::disable_if>::type* = 0, - const typename boost::enable_if>::type* = 0, - const typename boost::disable_if>>::type* = 0); + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if>::value>::type* = 0); template void GetPrintableType(util::ParamData& d, diff --git a/src/mlpack/bindings/python/get_printable_type_impl.hpp b/src/mlpack/bindings/python/get_printable_type_impl.hpp index 0181079aa1..9494065b4b 100644 --- a/src/mlpack/bindings/python/get_printable_type_impl.hpp +++ b/src/mlpack/bindings/python/get_printable_type_impl.hpp @@ -22,11 +22,11 @@ namespace python { template inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*) { return "unknown"; } @@ -34,11 +34,11 @@ inline std::string GetPrintableType( template<> inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*) { return "int"; } @@ -46,11 +46,11 @@ inline std::string GetPrintableType( template<> inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*) { return "float"; } @@ -58,11 +58,11 @@ inline std::string GetPrintableType( template<> inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*) { return "str"; } @@ -70,11 +70,11 @@ inline std::string GetPrintableType( template<> inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*) { return "int"; } @@ -82,11 +82,11 @@ inline std::string GetPrintableType( template<> inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*) { return "bool"; } @@ -94,9 +94,9 @@ inline std::string GetPrintableType( template inline std::string GetPrintableType( util::ParamData& d, - const typename boost::enable_if>::type*, - const typename boost::disable_if>>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*) { return "list of " + GetPrintableType(d) + "s"; } @@ -104,9 +104,9 @@ inline std::string GetPrintableType( template inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::enable_if>::type*, - const typename boost::disable_if>>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*) { std::string type = "matrix"; if (std::is_same::value) @@ -127,8 +127,8 @@ inline std::string GetPrintableType( template inline std::string GetPrintableType( util::ParamData& /* d */, - const typename boost::enable_if>>::type*) + const typename std::enable_if>::value>::type*) { return "categorical matrix"; } @@ -136,10 +136,10 @@ inline std::string GetPrintableType( template inline std::string GetPrintableType( util::ParamData& d, - const typename boost::disable_if>::type*, - const typename boost::enable_if>::type*, - const typename boost::disable_if>>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*) { return d.cppType + "Type"; } diff --git a/src/mlpack/bindings/python/import_decl.hpp b/src/mlpack/bindings/python/import_decl.hpp index b060a66dfe..e6518ce461 100644 --- a/src/mlpack/bindings/python/import_decl.hpp +++ b/src/mlpack/bindings/python/import_decl.hpp @@ -26,8 +26,8 @@ template void ImportDecl( util::ParamData& d, const size_t indent, - const typename boost::disable_if>::type* = 0, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0) { // First, we have to parse the type. If we have something like, e.g., // 'LogisticRegression<>', we must convert this to 'LogisticRegression[T=*].' @@ -53,8 +53,8 @@ template void ImportDecl( util::ParamData& /* d */, const size_t /* indent */, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0) { // Print nothing. } @@ -66,7 +66,7 @@ template void ImportDecl( util::ParamData& /* d */, const size_t /* indent */, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0) { // Print nothing. } diff --git a/src/mlpack/bindings/python/print_class_defn.hpp b/src/mlpack/bindings/python/print_class_defn.hpp index ff1de4b26e..53d07d11e7 100644 --- a/src/mlpack/bindings/python/print_class_defn.hpp +++ b/src/mlpack/bindings/python/print_class_defn.hpp @@ -25,8 +25,8 @@ namespace python { template void PrintClassDefn( util::ParamData& /* d */, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0) { // Do nothing. } @@ -37,7 +37,7 @@ void PrintClassDefn( template void PrintClassDefn( util::ParamData& /* d */, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0) { // Do nothing. } @@ -48,8 +48,8 @@ void PrintClassDefn( template void PrintClassDefn( util::ParamData& d, - const typename boost::disable_if>::type* = 0, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0) { // First, we have to parse the type. If we have something like, e.g., // 'LogisticRegression<>', we must convert this to 'LogisticRegression[].' diff --git a/src/mlpack/bindings/python/print_input_processing.hpp b/src/mlpack/bindings/python/print_input_processing.hpp index c4a8ed5006..5137db40e9 100644 --- a/src/mlpack/bindings/python/print_input_processing.hpp +++ b/src/mlpack/bindings/python/print_input_processing.hpp @@ -31,11 +31,11 @@ template void PrintInputProcessing( util::ParamData& d, const size_t indent, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if>::value>::type* = 0) { // The copy_all_inputs parameter must be handled first, and therefore is // outside the scope of this code. @@ -164,11 +164,11 @@ template void PrintInputProcessing( util::ParamData& d, const size_t indent, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>>::type* = 0, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if>::value>::type* = 0, + const typename std::enable_if::value>::type* = 0) { const std::string prefix(indent, ' '); @@ -251,8 +251,8 @@ template void PrintInputProcessing( util::ParamData& d, const size_t indent, - const typename boost::disable_if>::type* = 0, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0) { const std::string prefix(indent, ' '); @@ -372,9 +372,9 @@ template void PrintInputProcessing( util::ParamData& d, const size_t indent, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0) { // First, get the correct class name if needed. std::string strippedType, printedType, defaultsType; @@ -445,9 +445,9 @@ template void PrintInputProcessing( util::ParamData& d, const size_t indent, - const typename boost::disable_if>::type* = 0, - const typename boost::enable_if>>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if>::value>::type* = 0) { // The user should pass in a matrix type of some sort. const std::string prefix(indent, ' '); diff --git a/src/mlpack/bindings/python/print_output_processing.hpp b/src/mlpack/bindings/python/print_output_processing.hpp index af1ef95a93..e9c89200b3 100644 --- a/src/mlpack/bindings/python/print_output_processing.hpp +++ b/src/mlpack/bindings/python/print_output_processing.hpp @@ -30,10 +30,10 @@ void PrintOutputProcessing( util::ParamData& d, const size_t indent, const bool onlyOutput, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if>::value>::type* = 0) { const std::string prefix(indent, ' '); @@ -86,7 +86,7 @@ void PrintOutputProcessing( util::ParamData& d, const size_t indent, const bool onlyOutput, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0) { const std::string prefix(indent, ' '); @@ -128,8 +128,8 @@ void PrintOutputProcessing( util::ParamData& d, const size_t indent, const bool onlyOutput, - const typename boost::enable_if>>::type* = 0) + const typename std::enable_if>::value>::type* = 0) { const std::string prefix(indent, ' '); @@ -170,8 +170,8 @@ void PrintOutputProcessing( util::ParamData& d, const size_t indent, const bool onlyOutput, - const typename boost::disable_if>::type* = 0, - const typename boost::enable_if>::type* = 0) + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0) { // Get the type names we need to use. std::string strippedType, printedType, defaultsType; diff --git a/src/mlpack/bindings/python/print_type_doc.hpp b/src/mlpack/bindings/python/print_type_doc.hpp index 88186faafb..aad90ee4b7 100644 --- a/src/mlpack/bindings/python/print_type_doc.hpp +++ b/src/mlpack/bindings/python/print_type_doc.hpp @@ -25,11 +25,11 @@ namespace python { template std::string PrintTypeDoc( util::ParamData& data, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>::type* = 0, - const typename boost::disable_if>>::type* = 0); + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if>::value>::type* = 0); /** * Return a string representing the command-line type of a vector. @@ -62,8 +62,8 @@ std::string PrintTypeDoc( template std::string PrintTypeDoc( util::ParamData& data, - const typename boost::disable_if>::type* = 0, - const typename boost::enable_if>::type* = 0); + const typename std::enable_if::value>::type* = 0, + const typename std::enable_if::value>::type* = 0); /** * Print the command-line type of an option into a string. diff --git a/src/mlpack/bindings/python/print_type_doc_impl.hpp b/src/mlpack/bindings/python/print_type_doc_impl.hpp index 8ab5986721..64b6ca3e22 100644 --- a/src/mlpack/bindings/python/print_type_doc_impl.hpp +++ b/src/mlpack/bindings/python/print_type_doc_impl.hpp @@ -24,11 +24,11 @@ namespace python { template std::string PrintTypeDoc( util::ParamData& data, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>::type*, - const typename boost::disable_if>>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*, + const typename std::enable_if>::value>::type*) { // A flag type. if (std::is_same::value) @@ -150,8 +150,8 @@ std::string PrintTypeDoc( template std::string PrintTypeDoc( util::ParamData& /* data */, - const typename boost::disable_if>::type*, - const typename boost::enable_if>::type*) + const typename std::enable_if::value>::type*, + const typename std::enable_if::value>::type*) { return "An mlpack model pointer. This type can be pickled to or from disk, " "and internally holds a pointer to C++ memory containing the mlpack "