Dispatcher Class

template <typename T> class Dispatcher

A class for testing wrapped template parameter types. More...

Header: #include <template_sugar.h>

Public Functions

void byConstRef(const T &value)
void byPointer(T *value)
void nested(MyContainer<T> items)

Detailed Description

T is the dispatched element type.

Dispatcher exercises canonical fallback for wrapped template parameter types such as T *, const T &, and MyContainer<T>. These verify that canonical comparison is symmetric: both sides canonicalize the same way, so the fallback produces correct matches even though the user-facing template parameter name is lost in the canonical form.

Member Function Documentation

void Dispatcher::byConstRef(const T &value)

Dispatches via a const reference to value.

void Dispatcher::byPointer(T *value)

Dispatches via a pointer to value.

void Dispatcher::nested(MyContainer<T> items)

Dispatches all elements in items.