Skip to content

Commit

Permalink
Avoid deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Feb 1, 2024
1 parent ebdcda4 commit e0a6d10
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ql/termstructures/yield/bondhelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ namespace QuantLib {
Deprecated in version 1.34.
*/
[[deprecated("Do not use; this method is broken and will be removed.")]]
ext::shared_ptr<FixedRateBond> fixedRateBond() const { return fixedRateBond_; }
ext::shared_ptr<FixedRateBond> fixedRateBond() const {
QL_DEPRECATED_DISABLE_WARNING
return fixedRateBond_;
QL_DEPRECATED_ENABLE_WARNING
}

//! \name Visitability
//@{
Expand Down Expand Up @@ -148,7 +152,11 @@ namespace QuantLib {
Deprecated in version 1.34.
*/
[[deprecated("Do not use; this method is broken and will be removed.")]]
ext::shared_ptr<CPIBond> cpiBond() const;
ext::shared_ptr<CPIBond> cpiBond() const {
QL_DEPRECATED_DISABLE_WARNING
return cpiBond_;
QL_DEPRECATED_ENABLE_WARNING
}

//! \name Visitability
//@{
Expand Down

0 comments on commit e0a6d10

Please sign in to comment.