Skip to content

Commit

Permalink
Avoid gcc warning in older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Jul 23, 2024
1 parent d45d6c2 commit c3d7f45
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ql/functional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,22 @@ namespace QuantLib {
*/
using std::cref; // NOLINT(misc-unused-using-decls)

#if defined(__GNUC__) && (__GNUC__ <= 9)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wattributes"
#endif

/*! \deprecated Use the std::placeholders namespace instead.
Deprecated in version 1.36.
*/
namespace [[deprecated("Use the std::placeholders namespace instead")]] placeholders {
using namespace std::placeholders; // NOLINT(misc-unused-using-decls)
}

#if defined(__GNUC__) && (__GNUC__ <= 9)
#pragma GCC diagnostic pop
#endif

/*! \deprecated To check if a function is empty, use it in a bool context
instead of comparing it to QL_NULL_FUNCTION.
Deprecated in version 1.32.
Expand Down

0 comments on commit c3d7f45

Please sign in to comment.