mlpack  3.0.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Attributes | List of all members
HasConstSignatures< ClassType, CheckerA, ConstSignatureA, StaticSignatureA, CheckerB, ConstSignatureB, StaticSignatureB > Struct Template Reference

Utility struct: sometimes we want to know if we have two functions available, and that at least one of them is const and both of them are not non-const and non-static. More...

Static Public Attributes

static const bool HasAnyFormA
 
static const bool HasAnyFormB
 
static const bool HasEitherConstForm
 
static const bool value = HasEitherConstForm && HasAnyFormA && HasAnyFormB
 

Detailed Description

template<typename ClassType, template< typename, template< typename...> class, size_t > class CheckerA, template< typename...> class ConstSignatureA, template< typename...> class StaticSignatureA, template< typename, template< typename...> class, size_t > class CheckerB, template< typename...> class ConstSignatureB, template< typename...> class StaticSignatureB>
struct mlpack::optimization::traits::HasConstSignatures< ClassType, CheckerA, ConstSignatureA, StaticSignatureA, CheckerB, ConstSignatureB, StaticSignatureB >

Utility struct: sometimes we want to know if we have two functions available, and that at least one of them is const and both of them are not non-const and non-static.

If the corresponding checkers (from HAS_METHOD_FORM()) are given as CheckerA and CheckerB, and the corresponding const and static function signatures are given as ConstSignatureA, StaticSignatureA, ConstSignatureB, and StaticSignatureB, then 'value' will be true if methods with the correct names exist in the given ClassType and at least one of those two methods is const, and neither method is non-const and non-static.

Definition at line 318 of file traits.hpp.

Member Data Documentation

const bool HasAnyFormA
static
Initial value:
=
CheckerA<ClassType, ConstSignatureA, 0>::value ||
CheckerA<ClassType, StaticSignatureA, 0>::value

Definition at line 321 of file traits.hpp.

const bool HasAnyFormB
static
Initial value:
=
CheckerB<ClassType, ConstSignatureB, 0>::value ||
CheckerB<ClassType, StaticSignatureB, 0>::value

Definition at line 325 of file traits.hpp.

const bool HasEitherConstForm
static
Initial value:
=
CheckerA<ClassType, ConstSignatureA, 0>::value ||
CheckerB<ClassType, ConstSignatureB, 0>::value

Definition at line 330 of file traits.hpp.

const bool value = HasEitherConstForm && HasAnyFormA && HasAnyFormB
static

Definition at line 334 of file traits.hpp.


The documentation for this struct was generated from the following file: