[mlpack-git] master: Add SFINAE pattern for the SeqLen function. (263688c)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Fri Nov 13 12:45:40 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/0f4e83dc9cc4dcdc315d2cceee32b23ebab114c2...7388de71d5398103ee3a0b32b4026902a40a67b3

>---------------------------------------------------------------

commit 263688c5678570c5bd119f73b109cc099a333eea
Author: marcus <marcus.edel at fu-berlin.de>
Date:   Fri Nov 6 16:32:41 2015 +0100

    Add SFINAE pattern for the SeqLen function.


>---------------------------------------------------------------

263688c5678570c5bd119f73b109cc099a333eea
 src/mlpack/methods/ann/layer/layer_traits.hpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mlpack/methods/ann/layer/layer_traits.hpp b/src/mlpack/methods/ann/layer/layer_traits.hpp
index 9a491b7..25cf6a1 100644
--- a/src/mlpack/methods/ann/layer/layer_traits.hpp
+++ b/src/mlpack/methods/ann/layer/layer_traits.hpp
@@ -64,6 +64,10 @@ HAS_MEM_FUNC(Deterministic, HasDeterministicCheck);
 // RecurrentParameter() function.
 HAS_MEM_FUNC(RecurrentParameter, HasRecurrentParameterCheck);
 
+// This gives us a HasSeqLenCheck<T, U> type (where U is a function pointer) we
+// can use with SFINAE to catch when a type has a SeqLen() function.
+HAS_MEM_FUNC(SeqLen, HasSeqLenCheck);
+
 }; // namespace ann
 }; // namespace mlpack
 



More information about the mlpack-git mailing list