![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
Helper for accessing a value, employing either a conversion or downcast, depending on the relation of the source type (type of the original value) and the target type (type we need within the usage context). More...
Go to the source code of this file.
Helper for accessing a value, employing either a conversion or downcast, depending on the relation of the source type (type of the original value) and the target type (type we need within the usage context).
When instantiating AcessCasted<TAR>, we get a template static function AcessCasted<TAR>::access<SRC>(SRC&& elm), where the actual implementation is chosen using based on our type traits. If no sensible implementation can be selected, a static assertion will be triggered.
The possible conversion path is limited to options considered "safe"
Definition in file access-casted.hpp.
Namespaces | |
| namespace | util |
| namespace | util::anonymous_namespace{access-casted.hpp} |
Typedefs | |
| template<typename T > | |
| using | PlainType = typename remove_pointer< typename remove_reference< T >::type >::type |
Classes | |
| struct | has_RTTI< T > |
| struct | can_downcast< SRC, TAR > |
| struct | can_use_dynamic_downcast< SRC, TAR > |
| struct | can_use_conversion< SRC, TAR > |
| struct | can_take_address< SRC, TAR > |
| struct | can_dereference< SRC, TAR > |
| struct | if_can_use_dynamic_downcast< SRC, TAR > |
| struct | if_can_use_conversion< SRC, TAR > |
| struct | if_can_take_address< SRC, TAR > |
| struct | if_can_dereference< SRC, TAR > |
| struct | AccessCasted< TAR > |
| Helper template to access a given value, possibly converted or casted in a safe way. More... | |