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

Incomprehensible error message on clang #55

Open
Mrkol opened this issue Nov 13, 2022 · 1 comment
Open

Incomprehensible error message on clang #55

Mrkol opened this issue Nov 13, 2022 · 1 comment
Labels

Comments

@Mrkol
Copy link

Mrkol commented Nov 13, 2022

@Naios

When trying to initialize fu2::function_view<float(float)> with an object of type fu2::function<float(float) const>, clang 14 spews out an incomprehensible error message without a proper "instantiation stack". It is possible to infer what the problem is from const T not being castable to void* inside address_taker, but I think a proper concept or static assert based error message would be much preferred.


Commit Hash

2d3a878

Expected Behavior

Pretty error message, "cannot initialize a non-const callable function view with a const-only callable function".

Actual Behavior

Incomprehensible error message

Steps to Reproduce

Try to initialize a fu2::function_view<float(float)> with an object of type fu2::function<float(float) const>

Your Environment

  • OS: Windows
  • Compiler and version: Clang-cl 14
  • Standard library (if non default): MSVC
@Naios
Copy link
Owner

Naios commented Dec 5, 2022

Is this issue maybe a duplication of #21?

@Naios Naios added the bug label Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants