SFINAE construct to test if ManagedMemory has a constructor with Args... as parameter.
More...
|
| enum | { value = std::is_same_v<decltype(test<ManagedMemory, Args...>(0)), std::true_type>
} |
| | Enum to get statically the result of the test.
|
| |
|
| template<class TestManagedMemory , class... TestArgs> |
| static std::true_type | test (decltype(new TestManagedMemory((std::declval< TestArgs >())...))) |
| | True test, testing if a constructor with the right parameters exist and can be called. More...
|
| |
| template<class TestManagedMemory , class ... TestArgs> |
| static std::false_type | test (...) |
| | False test, default test in case the searched constructor does not exist, without instantiating anything. More...
|
| |
template<class ManagedMemory, class... Args>
class hh::StaticMemoryManager< ManagedMemory, Args >::HasConstructor
SFINAE construct to test if ManagedMemory has a constructor with Args... as parameter.
https://en.cppreference.com/w/cpp/language/sfinae
Definition at line 88 of file static_memory_manager.h.
◆ test() [1/2]
template<class ManagedMemory, class... Args>
template<class TestManagedMemory , class... TestArgs>
| static std::true_type hh::StaticMemoryManager< ManagedMemory, Args >::HasConstructor::test |
( |
decltype(new TestManagedMemory((std::declval< TestArgs >())...)) |
| ) |
|
|
staticprivate |
True test, testing if a constructor with the right parameters exist and can be called.
- Template Parameters
-
| TestManagedMemory | Type of data to test |
| TestArgs | Type of constructor's parameters |
- Returns
- std::true_type
◆ test() [2/2]
template<class ManagedMemory, class... Args>
template<class TestManagedMemory , class ... TestArgs>
False test, default test in case the searched constructor does not exist, without instantiating anything.
- Template Parameters
-
| TestManagedMemory | Type of data to test |
| TestArgs | Type of constructor's parameters |
- Returns
- std::false_type
The documentation for this class was generated from the following file: