template<class Access, class... T>
struct member_type_access< Access, T >
Instances of this template define member types which alias a named member type of one of their template parameters.
- Template Parameters
-
| Access | A type defined by UGMISC_DECL_MEMBER_ACCESS |
| T | A list of types to search, in order, for a member type of the correct name. The name is determined by Access. If one of the types is in instance of default_type, then default_type::type is used as a default type if none of the other types has the correct member. |
- Note
- It is an error to supply two or more instances of default_type.
For example:
using type = ugmisc::member_type_access<FooType, X, Y, ugmisc::default_type<void>>;
type::has_member;
type::has_default;
type::has_type;
typename type::type;
typename type::safe_type;
#define UGMISC_DECL_MEMBER_ACCESS(TNAME, NAME)
Definition member.hpp:165
??? type
Definition member.hpp:1505
- Note
- The types in the T... parameter pack are turned into a type_list using flatten_t. This means you can include type_lists of types you want to include in the list in the template parameters. If you really want one of the checked types to be a type_list, wrap it in a wrapped_list.
template<class Access, class... T>
- Note
- This is not actually declared if has_type is false.
The type is the first T::foo which is a valid type expression, if there is one and T is not an instance of default_type.
If there is no such valid expression, the type will be the value of T::type where T is the single member of the T... parameter pack which is an instance of default_type.