Skip to content

Replace std::invoke usages with a new __ztd_detail::__invoke #2

Description

@TerensTare

<functional> is a huge header, containing (but not limited to) hash, reference_wrapper, function, invoke and much more. Most of the time all these classes are not needed at the same place at the same time, so a #include <functional> may be something expensive, especially on headers (for example reference_wrapper.hpp). Thus I propose to add a new header on ztd/idk/detail named invoke.hpp which provides an implementation of std::invoke/std::invoke_result/std::is_invocable named __ztd_detail::{__invoke, __invoke_result, __is_invocable} and replace the use of the equivalent std:: classes over the library. A reference implementation of std::invoke can be found here.

Activity

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

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomersquestionFurther information is requested

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions