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

Compilation error due to handle::clone using incomplete handle type (C++20) #214

Closed
gix opened this issue Dec 17, 2019 · 3 comments
Closed

Comments

@gix
Copy link
Contributor

gix commented Dec 17, 2019

handle::clone() returns result<handle>, and using C++20 result requires a complete type due to the is_destructible check in type_can_be_used_in_basic_result. But at this point the handle class is still incomplete.

@ned14
Copy link
Owner

ned14 commented Dec 17, 2019

You surprise me, as I use LLFIO in C++ 20.

Which compiler and standard library? Exact versions please.

@gix
Copy link
Contributor Author

gix commented Dec 17, 2019

MSVC 19.24.28314 and clang-cl/clang with a trunk build from last week (clang required fixing the __cpuid lambda in impl/windows/storage_profile.ipp by making the cpuInfo pointer non-const).

Small repro: https://godbolt.org/z/38ijAH

My cmake options are, among others:

-DLLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE=ON
-DCMAKE_CXX_STANDARD=20

@ned14 ned14 transferred this issue from ned14/llfio Dec 18, 2019
ned14 added a commit that referenced this issue Dec 18, 2019
…e early check for destructibility of `T` and `E`, so removed template constraints, falling back to static assert which runs later in the type instantiation sequence.
@ned14
Copy link
Owner

ned14 commented Dec 18, 2019

Ok, should be fixed now. If your LLFIO is using Outcome via superbuild into your build directory, you will need to remove the outcome subdirectory within your build directory, and rerun cmake.

@ned14 ned14 closed this as completed Dec 18, 2019
ned14 added a commit that referenced this issue Jan 24, 2020
…e early check for destructibility of `T` and `E`, so removed template constraints, falling back to static assert which runs later in the type instantiation sequence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants