Skip to content

Commit

Permalink
fix: workaround compiling with debug mode (#3222)
Browse files Browse the repository at this point in the history
* fix: workaround compiling with debug mode

* Patch: improve readability of std::vector debug mode fix

Co-authored-by: Enrico Seiler <[email protected]>

* doc: add example of the underlying issue of the workaround

Co-authored-by: Enrico Seiler <[email protected]>

---------

Co-authored-by: Enrico Seiler <[email protected]>
  • Loading branch information
SGSSGene and eseiler authored Jan 17, 2024
1 parent 97f908b commit 646b6a2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions include/seqan3/core/platform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,14 @@ static_assert(sdsl::sdsl_version_major == 3, "Only version 3 of the SDSL is supp
# endif
#endif

//!\brief Our char literals returning std::vector should be constexpr if constexpr std::vector is supported.
#if defined(__cpp_lib_constexpr_vector) && __cpp_lib_constexpr_vector >= 201907L
/*!\brief Our char literals returning std::vector should be constexpr if constexpr std::vector is supported.
*
* The _GLIBCXX_DEBUG statement is a workaround for a libstdc++ bug
* \see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104748
* \see https://github.com/seqan/seqan3/issues/3221
* \see https://godbolt.org/z/159n8xrdo
**/
#if __cpp_lib_constexpr_vector >= 201907L && (defined(_LIBCPP_VERSION) || !defined(_GLIBCXX_DEBUG))
# define SEQAN3_WORKAROUND_LITERAL constexpr
#else
# define SEQAN3_WORKAROUND_LITERAL inline
Expand Down

4 comments on commit 646b6a2

@vercel
Copy link

@vercel vercel bot commented on 646b6a2 Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

seqan3 – ./

seqan3-seqan.vercel.app
seqan3.vercel.app
seqan3-git-master-seqan.vercel.app

@notestaff
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eseiler Thanks a lot for fixing this. Do you know approximately when you plan to tag a (pre-)release that includes this fix?

@eseiler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eseiler Thanks a lot for fixing this. Do you know approximately when you plan to tag a (pre-)release that includes this fix?

I can tag a pre-release later today.
I'll have to check whether there are any breaking changes, but I don't think so.

@eseiler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.