Skip to content

std::result_of and std::result_of_t are deprecated in C++17. They are superseded by std::invoke_result and std::invoke_result_t #109

Open

Description

@KevinWang-kk

(1) (since C++14)

template< class T >
using result_of_t = typename result_of::type; //(deprecated in C++17)

(2) (since C++17)
template< class F, class... ArgTypes>
using invoke_result_t = typename invoke_result<F, ArgTypes...>::type;

Activity

  1. Light7734 commented on Jan 10, 2024

    @Light7734

    ThreadPool fails to compile on clang16 w/ C++20 because of the use of std::result_of

    Also conan center only has the 20140926 version.

  2. wilx commented on Jan 10, 2024

    @wilx
    Contributor

    This thread pool is a good example but it has limitations. I would suggest using improved ThreadPool that was based on this example implementation that we us in log4cplus: log4cplus/ThreadPool

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