Recursive case, tries to match function with one base class of ConcreteType.
More...
#include <Track.h>
|
using | Retry = Switch< R, ConcreteType, BaseClasses... > |
| Recur to this type to try the next base class. More...
|
|
|
template<typename Function , typename ... Functions> |
static auto | test (const void *) -> decltype(Retry::template test< Function, Functions... >()) |
| Catch-all overload of undefined function used in decltype only. More...
|
|
template<typename Function , typename ... Functions> |
static auto | test (std::true_type *) -> decltype((void) std::declval< Function >()((BaseClass *) nullptr), applicable1< R, BaseClass, ConcreteType, Function, Functions... > |
| overload when upcast of ConcreteType* works, with sfinae'd return type More...
|
|
template<typename Function , typename ... Functions> |
static auto | test (std::true_type *) -> decltype((void) std::declval< Function >()((BaseClass *) nullptr, std::declval< Continuation< R > >()), applicable2< R, BaseClass, ConcreteType, Function, Functions... > |
| overload when upcast of ConcreteType* works, with sfinae'd return type More...
|
|
template<typename Function , typename ... Functions> |
static auto | test () -> decltype(test< Function, Functions... >((std::integral_constant< bool, Compatible > *) nullptr)) |
| undefined function used in decltype only to compute a type, using other overloads More...
|
|
|
static constexpr bool | Compatible |
| Whether upcast of ConcreteType* to first BaseClass* works. More...
|
|
template<typename R, typename ConcreteType, typename BaseClass, typename ... BaseClasses>
struct Track::Dispatcher::Switch< R, ConcreteType, BaseClass, BaseClasses... >
Recursive case, tries to match function with one base class of ConcreteType.
Computes a type as the return type of undefined member test()
Definition at line 576 of file Track.h.
◆ Retry
template<typename R , typename ConcreteType , typename BaseClass , typename ... BaseClasses>
Recur to this type to try the next base class.
Definition at line 579 of file Track.h.
◆ test() [1/4]
template<typename R , typename ConcreteType , typename BaseClass , typename ... BaseClasses>
template<typename Function , typename ... Functions>
static auto Track::Dispatcher::Switch< R, ConcreteType, BaseClass, BaseClasses... >::test |
( |
| ) |
-> decltype(test< Function, Functions... >((std::integral_constant< bool, Compatible > *) nullptr)) |
|
static |
undefined function used in decltype only to compute a type, using other overloads
◆ test() [2/4]
template<typename R , typename ConcreteType , typename BaseClass , typename ... BaseClasses>
template<typename Function , typename ... Functions>
static auto Track::Dispatcher::Switch< R, ConcreteType, BaseClass, BaseClasses... >::test |
( |
const void * |
| ) |
-> decltype(Retry::template test< Function, Functions... >()) |
|
static |
Catch-all overload of undefined function used in decltype only.
If ConcreteType is not compatible with BaseClass, or if Function does not accept BaseClass*, try other BaseClasses.
◆ test() [3/4]
template<typename R , typename ConcreteType , typename BaseClass , typename ... BaseClasses>
template<typename Function , typename ... Functions>
static auto Track::Dispatcher::Switch< R, ConcreteType, BaseClass, BaseClasses... >::test |
( |
std::true_type * |
| ) |
-> decltype(
(void) std::declval<Function>()
( (BaseClass*)nullptr ),
applicable1< R, BaseClass, ConcreteType,
Function, Functions... > |
|
inlinestatic |
overload when upcast of ConcreteType* works, with sfinae'd return type
If BaseClass is a base of ConcreteType and Function can take a pointer to it, then overload resolution chooses this. If not, then the sfinae rule makes this overload unavailable.
Definition at line 593 of file Track.h.
◆ test() [4/4]
template<typename R , typename ConcreteType , typename BaseClass , typename ... BaseClasses>
template<typename Function , typename ... Functions>
static auto Track::Dispatcher::Switch< R, ConcreteType, BaseClass, BaseClasses... >::test |
( |
std::true_type * |
| ) |
-> decltype(
(void) std::declval<Function>()
( (BaseClass*)nullptr,
std::declval< Continuation<R> >() ),
applicable2< R, BaseClass, ConcreteType,
Function, Functions... > |
|
inlinestatic |
overload when upcast of ConcreteType* works, with sfinae'd return type
If BaseClass is a base of ConcreteType and Function can take a pointer to it, with a second argument for a continuation, then overload resolution chooses this. If not, then the sfinae rule makes this overload unavailable.
Definition at line 607 of file Track.h.
◆ Compatible
template<typename R , typename ConcreteType , typename BaseClass , typename ... BaseClasses>
Initial value:
track_kind<BaseClass>(), track_kind<ConcreteType>() )
Whether upcast of ConcreteType* to first BaseClass* works.
Definition at line 617 of file Track.h.
The documentation for this struct was generated from the following file: