From 460a94883c0bd09cbdfd3f3fa4f218ae7cd25f2c Mon Sep 17 00:00:00 2001 From: Luigi Ballabio Date: Wed, 2 Oct 2024 14:20:49 +0200 Subject: [PATCH] Re-enable deprecation warnings for recent Clang versions --- .github/workflows/linux-full-tests.yml | 2 -- .github/workflows/linux-nondefault.yml | 2 -- .github/workflows/linux.yml | 2 -- ql/currency.cpp | 14 ++++---------- ql/currency.hpp | 2 +- 5 files changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/linux-full-tests.yml b/.github/workflows/linux-full-tests.yml index 0d047c40ec1..d2b26d5ec64 100644 --- a/.github/workflows/linux-full-tests.yml +++ b/.github/workflows/linux-full-tests.yml @@ -105,13 +105,11 @@ jobs: tag: noble cc: clang cxx: clang++ - cxxflags: -Wno-deprecated-declarations - name: "Clang 19" shortname: clang19 tag: oracular cc: clang cxx: clang++ - cxxflags: -Wno-deprecated-declarations - name: "C++17 mode" shortname: c++17 tag: rolling diff --git a/.github/workflows/linux-nondefault.yml b/.github/workflows/linux-nondefault.yml index a704336dc2a..501fa8a8d8c 100644 --- a/.github/workflows/linux-nondefault.yml +++ b/.github/workflows/linux-nondefault.yml @@ -100,13 +100,11 @@ jobs: tag: noble cc: clang cxx: clang++ - cxxflags: -Wno-deprecated-declarations - name: "Clang 19" shortname: clang19 tag: oracular cc: clang cxx: clang++ - cxxflags: -Wno-deprecated-declarations - name: "C++17 mode" shortname: c++17 tag: rolling diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 257475f1f31..3b26272195e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -44,14 +44,12 @@ jobs: tag: noble cc: clang cxx: clang++ - cxxflags: -Wno-deprecated-declarations tests: true - name: "Clang 19" shortname: clang19 tag: oracular cc: clang cxx: clang++ - cxxflags: -Wno-deprecated-declarations tests: true - name: "C++17 mode" shortname: c++17 diff --git a/ql/currency.cpp b/ql/currency.cpp index 5c268c9c224..fce0b13680b 100644 --- a/ql/currency.cpp +++ b/ql/currency.cpp @@ -89,16 +89,10 @@ namespace QuantLib { const std::string& formatString, const Currency& triangulationCurrency, const std::set& minorUnitCodes) - : data_(ext::make_shared(name, - code, - numericCode, - symbol, - fractionSymbol, - fractionsPerUnit, - rounding, - formatString, - triangulationCurrency, - minorUnitCodes)) {} + : Currency(name, code, numericCode, symbol, fractionSymbol, fractionsPerUnit, + rounding, triangulationCurrency, minorUnitCodes) { + data_->formatString = formatString; + } QL_DEPRECATED_ENABLE_WARNING diff --git a/ql/currency.hpp b/ql/currency.hpp index 8bb2f9b0044..a2588d0e404 100644 --- a/ql/currency.hpp +++ b/ql/currency.hpp @@ -139,7 +139,7 @@ namespace QuantLib { /*! \deprecated Use the constructor without formatString. Deprecated in version 1.33. */ - QL_DEPRECATED + [[deprecated("Use the constructor without formatString")]] Data(std::string name, std::string code, Integer numericCode,