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

g++ 9/10 compile error on std::variant<cti::work> #37

Open
p4654545 opened this issue Sep 22, 2020 · 5 comments
Open

g++ 9/10 compile error on std::variant<cti::work> #37

p4654545 opened this issue Sep 22, 2020 · 5 comments
Labels

Comments

@p4654545
Copy link

p4654545 commented Sep 22, 2020

@Naios

This concerns g++ 9.3.0 and 10.0.1

Using cti::work within a variant leads to a compiler error in "struct assert_wrong_copy_assign" in function2.hpp.

Using std::is_copy_constructible_v makes the compiler happy.


Commit Hash

Latest

Expected Behavior

No compiler error

Actual Behavior

I get this error from g++-9:

/root/.conan/data/function2/4.1.0///package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/function2/function2.hpp:1398:60: error: incomplete type 'std::is_copy_constructible<cti::promise_base<fu2::abi_400::detail::function<fu2::abi_400::detail::config<true, false, fu2::capacity_fixed<32> >, fu2::abi_400::detail::property<true, false, void() &&, void(cti::exception_arg_t, std::__exception_ptr::exception_ptr) &&> >, cti::detail::identity<> > >' used in nested name specifier
1398 | static_assert(!Config::is_owning || !Config::is_copyable ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
1399 | std::is_copy_constructible<std::decay_t>::value,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Steps to Reproduce

compile with g++-9 or 10 a source file with the following content (could not attach):

#include <continuable/continuable.hpp>
#include <variant>
void foo() { std::variant<cti::work> t; }

Your Environment

  • OS: debian bullseye/sid
  • Compiler and version: G++ 9.3.0, 10.0.1
  • Standard library (if non default): {Please write here}
@p4654545
Copy link
Author

my code got ruined, another try:

`#include <continuable/continuable.hpp>
#include <variant>

void foo() { std::variant<cti::work> t; }`

@p4654545 p4654545 reopened this Sep 22, 2020
@p4654545
Copy link
Author

reopen

@p4654545
Copy link
Author

It resembles this gcc bug

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90415

@p4654545
Copy link
Author

Would you accept a pull request on function2 which replaces std::is_copy_constructible by std::is_copy_constructible_v in function2.hpp?

@Naios
Copy link
Owner

Naios commented Oct 25, 2020

function2 is a C++14 lib and std::is_copy_constructible_v is C++17. Probably it is possible to provide a custom is_copy_constructible based on SFINAE when building with GCC for which I would accept a PR.

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