Skip to content

Visual Studio 2017 fails to compiler async with std::function as argument #354

Closed

Description

@FelixPetriconi

stlab/concurrency/task.hpp(45): error C3546: '...': there are no parameter packs available to expand
stlab/concurrency/task.hpp(48): note: see reference to alias template instantiation 'stlab::v1::task<R(Args...>::possibly_empty_t' being compiled

Unfortunately I am not able to create a reduced example.

Solution is to change task.hpp to

static auto is_empty(const F& f){
  if constexpr (std::is_pointer<std::decay_t<F>>::value ||
    std::is_member_pointer<std::decay_t<F>>::value ||
    std::is_same<std::function<R(Args...)>, std::decay_t<F>>::value)
  {
    return !f;
  }
  else
  {
    return false;
  }
}

Activity

  1. added a commit that references this issue on Feb 1, 2021
  2. FelixPetriconi commented on Feb 2, 2021

    @FelixPetriconi
    MemberAuthor

    Fixed in 1.5.6

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

Metadata

Metadata

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