Skip to content

<functional>: bind_front violates [func.require]p8 #1292

Description

@timsong-cpp

[func.require]p8:

Argument forwarding call wrappers returned by a given standard library function template have the same type if the types of their corresponding state entities are the same.

The state entities of bind_front all have decayed type but the type returned by bind_front depends on the cv-qualification and value category of the arguments:

STL/stl/inc/functional

Lines 1615 to 1618 in 9e76d8c

template <class _Fx, class... _Types>
_NODISCARD constexpr auto bind_front(_Fx&& _Func, _Types&&... _Args) {
return _Front_binder<_Fx, _Types...>(_STD forward<_Fx>(_Func), _STD forward<_Types>(_Args)...);
}

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

    bugSomething isn't workingfixedSomething works now, yay!

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions