Skip to content

Commit

Permalink
Workaround to self move assign error with _GLIBCXX_DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettDong committed Feb 16, 2021
1 parent 9a27d7f commit e5bdc93
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pch/main-pch.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
// Workaround to a bug in libstdc++ prior to GCC 11 causing
// Error: attempt to self move assign.
// when compiling with _GLIBCXX_DEBUG
// see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85828
#if defined(_GLIBCXX_DEBUG) && defined(__GNUC__) && (__GNUC__ < 11)
#include <debug/macros.h>
#undef __glibcxx_check_self_move_assign
#define __glibcxx_check_self_move_assign(x)
#ifdef __glibcxx_check_self_move_assign // suppress unused macro warning
#endif
#endif

#include <algorithm>
#include <array>
#include <bitset>
Expand Down

0 comments on commit e5bdc93

Please sign in to comment.