File overload_cast.h
FileList > module > utility > src > scl > utility > type_traits > overload_cast.h
Go to the source code of this file
Utility for disambiguating function and member function overloads. More...
#include <type_traits>
Namespaces
| Type | Name |
|---|---|
| namespace | scl Root namespace of ScL project. |
Detailed Description
This file provides the overload_cast variable template, which simplifies the process of selecting a specific signature from a set of overloaded functions or member functions.
It is particularly useful when taking the address of a function that has multiple overloads differing by: * Argument types. * Const, volatile, or const-qualifiers volatile. * Reference qualifiers (lvalue & or rvalue &&). * Noexcept specifications.
By using overload_cast<Args...>(ptr), the compiler can explicitly identify the intended overload without the need for verbose and error-prone manual static_cast to function pointer types.
The documentation for this class was generated from the following file module/utility/src/scl/utility/type_traits/overload_cast.h