Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blocking_kind customization does not compile #555

Open
Tradias opened this issue Jul 27, 2023 · 1 comment
Open

blocking_kind customization does not compile #555

Tradias opened this issue Jul 27, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Tradias
Copy link
Contributor

Tradias commented Jul 27, 2023

With the "recent" blocking_kind rework there are several places in the code that look like this (godbolt):

namespace unifex
{
inline constexpr struct blocking_t {
    auto operator()() const { return ""; }
} blocking;

namespace _let_v
{
struct _sender {
  static constexpr int blocking = 1;

  friend auto tag_invoke(const _sender& sender) noexcept {
    const char* v = blocking();  // error: called object type 'int' is not a function or function pointer
  }
};
}
}

For example in let_value.hpp:

friend constexpr blocking_kind tag_invoke(tag_t<unifex::blocking>, const type& sender) noexcept {
// get the runtime blocking_kind for the predecessor
blocking_kind pred = blocking(sender.pred_);

I don't understand how your pipeline even managed to compile libunifex. This godbolt example does not: https://godbolt.org/z/6MdYYM586

Proposed solution:

blocking_kind pred = unifex::blocking(sender.pred_);
@ispeters
Copy link
Contributor

ispeters commented Aug 1, 2023

I don't understand how your pipeline even managed to compile libunifex.

Excellent question! The only guesses I have are old, non-conformant compilers, or maybe we're not invoking the broken code.

@ispeters ispeters added the bug Something isn't working label Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants