Skip to content

Commit

Permalink
Remove GCC warning, from jbeder#970
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasfrosio committed Oct 2, 2021
1 parent 0d9dbcf commit c80548e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/yaml-cpp/node/impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,15 @@ inline bool Node::is(const Node& rhs) const {
template <typename T>
inline Node& Node::operator=(const T& rhs) {
Assign(rhs);
// work around GCC PR c++/98841
#if defined __GNUC__ && __GNUC__ < 11
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
return *this;
#if defined __GNUC__ && __GNUC__ < 11
#pragma GCC diagnostic pop
#endif
}

inline Node& Node::operator=(const Node& rhs) {
Expand Down

0 comments on commit c80548e

Please sign in to comment.