Skip to content

Missing eastl:: scope for array structured binding helpers #575

@Woazboat

Description

@Woazboat

The missing ::eastl:: namespace for integral_constant here causes the std::integral_constant to be used instead.

EASTL/include/EASTL/array.h

Lines 667 to 675 in 7fadbf0

namespace std
{
template<typename T, size_t N>
struct tuple_size<eastl::array<T, N>> : public integral_constant<size_t, N> {};
template<size_t I, typename T, size_t N>
struct tuple_element<I, eastl::array<T, N>> : public eastl::tuple_element<I, eastl::array<T, N>> {};
}

All EASTL names inside the std namespace block should be explicitly scoped with the ::eastl:: namespace similar to how it's done for eastl::pair in utility.h

EASTL/include/EASTL/utility.h

Lines 1006 to 1017 in 7fadbf0

namespace std
{
template <class... Ts>
struct tuple_size<::eastl::pair<Ts...>> : public ::eastl::integral_constant<size_t, sizeof...(Ts)>
{
};
template <size_t I, class... Ts>
struct tuple_element<I, ::eastl::pair<Ts...>> : public ::eastl::tuple_element<I, ::eastl::pair<Ts...>>
{
};
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions