Skip to content

Remove the workaround for the gcc bug 41933? #10

@Chandlerooo

Description

@Chandlerooo

I notice there are some workarounds in defer.hpp, dispatch.hpp and deferred.hpp:
https://github.com/3rdparty/libprocess/blob/main/include/process/defer.hpp
https://github.com/3rdparty/libprocess/blob/main/include/process/deferred.hpp
https://github.com/3rdparty/libprocess/blob/main/include/process/dispatch.hpp
like

// Due to a bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41933)
// with variadic templates and lambdas, we still need to do
// preprocessor expansions. In addition, due to a bug with clang (or
// libc++) we can't use std::bind with a std::function so we have to
// explicitly use the std::function<R(P...)>::operator() (see
// http://stackoverflow.com/questions/20097616/stdbind-to-a-stdfunction-crashes-with-clang).
...
      lambda::partial(                                               \
           &std::function<void(ENUM_PARAMS(N, P))>::operator(),         \
           std::function<void(ENUM_PARAMS(N, P))>(),                    \
           ENUM(N, FORWARD_A, _)       

This compiler bug is marked as fixed : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41933
Shall this workaround be removed? Does this bug still exist?

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