diff --git a/QuantLib.vcxproj b/QuantLib.vcxproj index 29b846cad23..a0bbb274750 100644 --- a/QuantLib.vcxproj +++ b/QuantLib.vcxproj @@ -2831,7 +2831,6 @@ - diff --git a/QuantLib.vcxproj.filters b/QuantLib.vcxproj.filters index ab32dccb410..8b09bc52e18 100644 --- a/QuantLib.vcxproj.filters +++ b/QuantLib.vcxproj.filters @@ -6662,7 +6662,6 @@ - diff --git a/ql/CMakeLists.txt b/ql/CMakeLists.txt index 9c4896329c7..e000e1c276c 100644 --- a/ql/CMakeLists.txt +++ b/ql/CMakeLists.txt @@ -375,7 +375,7 @@ set(QL_SOURCES math/integrals/integral.cpp math/integrals/kronrodintegral.cpp math/integrals/segmentintegral.cpp - math/interpolations/chebyshevinterpolation.cpp + math/interpolations/chebyshevinterpolation.cpp math/matrix.cpp math/matrixutilities/basisincompleteordered.cpp math/matrixutilities/bicgstab.cpp @@ -646,7 +646,6 @@ set(QL_SOURCES models/volatility/constantestimator.cpp models/volatility/garch.cpp money.cpp - optional.cpp patterns/observable.cpp position.cpp prices.cpp @@ -1451,7 +1450,7 @@ set(QL_HEADERS math/interpolations/backwardflatlinearinterpolation.hpp math/interpolations/bicubicsplineinterpolation.hpp math/interpolations/bilinearinterpolation.hpp - math/interpolations/chebyshevinterpolation.hpp + math/interpolations/chebyshevinterpolation.hpp math/interpolations/convexmonotoneinterpolation.hpp math/interpolations/cubicinterpolation.hpp math/interpolations/extrapolation.hpp diff --git a/ql/Makefile.am b/ql/Makefile.am index 1d752a5ce7a..2236831b461 100644 --- a/ql/Makefile.am +++ b/ql/Makefile.am @@ -75,7 +75,6 @@ cpp_files = \ instrument.cpp \ interestrate.cpp \ money.cpp \ - optional.cpp \ position.cpp \ prices.cpp \ rebatedexercise.cpp \ @@ -103,7 +102,7 @@ else libQuantLib_la_SOURCES = $(cpp_files) -EXTRA_DIST = +EXTRA_DIST = endif @@ -180,4 +179,3 @@ install-data-hook: rm .config.hpp depend: makedepend $(INCLUDES) -- $(CFLAGS) -- $(SOURCES) - diff --git a/ql/optional.cpp b/ql/optional.cpp deleted file mode 100644 index 5d762700c8e..00000000000 --- a/ql/optional.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ - -/* - Copyright (C) 2023 Jonathan Sweemer - - This file is part of QuantLib, a free-software/open-source library - for financial quantitative analysts and developers - http://quantlib.org/ - - QuantLib is free software: you can redistribute it and/or modify it - under the terms of the QuantLib license. You should have received a - copy of the license along with this program; if not, please email - . The license is also available online at - . - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. See the license for more details. -*/ - -#include - -namespace QuantLib::ext { - - #if !defined(QL_USE_STD_OPTIONAL) - const boost::none_t& nullopt = boost::none; - #endif - - } - diff --git a/ql/optional.hpp b/ql/optional.hpp index e25d38f85cf..e9fe910e52b 100644 --- a/ql/optional.hpp +++ b/ql/optional.hpp @@ -36,12 +36,10 @@ namespace QuantLib::ext { #if defined(QL_USE_STD_OPTIONAL) using std::optional; // NOLINT(misc-unused-using-decls) - // here we can assume C++17 inline constexpr const std::nullopt_t& nullopt = std::nullopt; #else using boost::optional; // NOLINT(misc-unused-using-decls) - // here we can't - extern const boost::none_t& nullopt; + inline constexpr const boost::none_t& nullopt = boost::none; #endif }