Skip to content

Specialize cetl::type_id_value<T> for built-in types and cv-qualified types #109

Description

@pavel-kirienko

Enabling the CETL RTTI capability for built-in types will enable their use with cetl::any.

Pseudocode:

template <typename T>
constexpr type_id type_id_value = T::_get_type_id_();  // This is already defined in CETL.
template <> constexpr type_id type_id_value<bool>{{<UUID>}};
template <> constexpr type_id type_id_value<char>{{<UUID>}};
template <> constexpr type_id type_id_value<signed char>{{<UUID>}};
template <> constexpr type_id type_id_value<unsigned char>{{<UUID>}};
template <> constexpr type_id type_id_value<int>{{<UUID>}};
template <> constexpr type_id type_id_value<unsigned int>{{<UUID>}};
...

ALSO, we need specializations for cv-qualified types that implicitly remove the cv-qualifiers, similar to variant_alternative_t et al.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions