![]() |
C++ Library Extensions 2022.12.09
To help learn modern C++ programming
|
#include <tpf_output.hpp>
Go to the source code of this file.
Classes | |
struct | enable_if< predicate, ReturnType > |
struct | enable_if< true, ReturnType > |
Typedefs | |
template<bool predicate, typename ReturnType = void> | |
using | enable_if_t = typename enable_if< predicate, ReturnType >::type |
template<typename Type > | |
using | enable_if_int_t = enable_if_t< std::is_same_v< Type, int >, Type > |
template<typename Type > | |
using | enable_if_double_t = enable_if_t< std::is_same_v< Type, double >, Type > |
Functions | |
template<typename Type > | |
enable_if_int_t< Type > | remainder (Type n, Type d) |
template<typename Type > | |
enable_if_double_t< Type > | remainder (Type n, Type d) |
void | test_remainder () |
int | main () |
Variables | |
tpf::sstream | stream |
auto | endl = tpf::endl |
using enable_if_double_t = enable_if_t<std::is_same_v<Type, double>, Type> |
Definition at line 29 of file 12_sfinae.cpp.
using enable_if_int_t = enable_if_t<std::is_same_v<Type, int>, Type> |
Definition at line 26 of file 12_sfinae.cpp.
using enable_if_t = typename enable_if<predicate, ReturnType>::type |
Definition at line 23 of file 12_sfinae.cpp.
int main | ( | ) |
enable_if_int_t< Type > remainder | ( | Type | n, |
Type | d | ||
) |
enable_if_double_t< Type > remainder | ( | Type | n, |
Type | d | ||
) |
Definition at line 42 of file 12_sfinae.cpp.
void test_remainder | ( | ) |
Definition at line 49 of file 12_sfinae.cpp.
auto endl = tpf::endl |
Definition at line 4 of file 12_sfinae.cpp.
tpf::sstream stream |
Definition at line 3 of file 12_sfinae.cpp.