Skip to content

Commit

Permalink
Additional Clang warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Dec 16, 2021
1 parent e47b6a5 commit 6147978
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions test/function_n_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

// For more information, see http://www.boost.org

#if defined(__clang__)
# pragma clang diagnostic ignored "-Wself-assign-overloaded"
#if defined(__clang__) && defined(__has_warning)
# if __has_warning( "-Wself-assign-overloaded" )
# pragma clang diagnostic ignored "-Wself-assign-overloaded"
# endif
#endif

#include <boost/function.hpp>
Expand Down
6 changes: 4 additions & 2 deletions test/function_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

// For more information, see http://www.boost.org

#if defined(__clang__)
# pragma clang diagnostic ignored "-Wself-assign-overloaded"
#if defined(__clang__) && defined(__has_warning)
# if __has_warning( "-Wself-assign-overloaded" )
# pragma clang diagnostic ignored "-Wself-assign-overloaded"
# endif
#endif

#include <boost/function.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/mem_fun_cxx98.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

struct Y {
Y(int y = 0) : y_(y) {}
bool operator==(const Y& rhs) { return y_ == rhs.y_; }
bool operator==(const Y& rhs) const { return y_ == rhs.y_; }
private:
int y_;
};
Expand Down
2 changes: 1 addition & 1 deletion test/mem_fun_portable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

struct Y {
Y(int y = 0) : y_(y) {}
bool operator==(const Y& rhs) { return y_ == rhs.y_; }
bool operator==(const Y& rhs) const { return y_ == rhs.y_; }
private:
int y_;
};
Expand Down

0 comments on commit 6147978

Please sign in to comment.