Skip to content

[c++26 fix] include <exception> in Gen.hpp#344

Open
marcia-pedals wants to merge 1 commit intoemil-e:masterfrom
marcia-pedals:master
Open

[c++26 fix] include <exception> in Gen.hpp#344
marcia-pedals wants to merge 1 commit intoemil-e:masterfrom
marcia-pedals:master

Conversation

@marcia-pedals
Copy link

@marcia-pedals marcia-pedals commented Feb 23, 2026

When compiling in a c++26 project, I get this error:

  rapidcheck/Gen.hpp:72:22: error: calling 'current_exception' with incomplete return type 'exception_ptr'
     72 |     auto exception = std::current_exception();
        |                      ^~~~~~~~~~~~~~~~~~~~~~~~
  .../exception/operations.h:36:33: note: forward declaration of 'std::exception_ptr'
     36 | class _LIBCPP_EXPORTED_FROM_ABI exception_ptr;
        |                                 ^

Including <exception> fixes it, and this seems correct to me because https://en.cppreference.com/w/cpp/error/exception_ptr.html says that it's defined in <exception>.

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

Successfully merging this pull request may close these issues.

1 participant