Skip to content

Commit 646b6a2

Browse files
SGSSGeneeseiler
andauthored
fix: workaround compiling with debug mode (#3222)
* 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]>
1 parent 97f908b commit 646b6a2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

include/seqan3/core/platform.hpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,14 @@ static_assert(sdsl::sdsl_version_major == 3, "Only version 3 of the SDSL is supp
259259
# endif
260260
#endif
261261

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

0 commit comments

Comments
 (0)