Skip to content

<xstring>: basic_string::_Is_elem_cptr should be a variable template #2898

@CaseyCarter

Description

@CaseyCarter

_Is_elem_cptr<T> is currently an alias for bool_constant<stuff>. We only ever use it as _Is_elem_cptr<T>::value. It could more simply be a constexpr bool variable template initialized with stuff that we access directly.

STL/stl/inc/xstring

Lines 2473 to 2474 in 04ee878

template <class _Iter>
using _Is_elem_cptr = bool_constant<_Is_any_of_v<_Iter, const _Elem* const, _Elem* const, const _Elem*, _Elem*>>;

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSomething can be improvedfixedSomething works now, yay!good first issueGood for newcomers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions