SYNOPSIS

Macros

#define HAS_MEM_FUNC(FUNC, NAME)

Detailed Description

Author:

Trironk Kiatkungwanglai

This file contains macro utilities for the SFINAE Paradigm. These utilities determine if classes passed in as template parameters contain members at compile time, which is useful for changing functionality depending on what operations an object is capable of performing.

This file is part of MLPACK 1.0.10.

MLPACK is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

MLPACK is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details (LICENSE.txt).

You should have received a copy of the GNU General Public License along with MLPACK. If not, see http://www.gnu.org/licenses/.

Definition in file sfinae_utility.hpp.

Macro Definition Documentation

#define HAS_MEM_FUNC(FUNC, NAME)

Value:

template<typename T, typename sig>                                              struct NAME {                                                                     typedef char yes[1];                                                            typedef char no [2];                                                            template<typename U, U> struct type_check;                                      template<typename _1> static yes &chk(type_check<sig, &_1::FUNC> *);            template<typename   > static no  &chk(...);                                     static bool const value = sizeof(chk<T>(0)) == sizeof(yes);                   };

Definition at line 50 of file sfinae_utility.hpp.

Author

Generated automatically by Doxygen for MLPACK from the source code.