Skip to content

Commit cc39de9

Browse files
merge QuantLib 1.28 release candidate
2 parents 7dca0bd + 1f06693 commit cc39de9

329 files changed

Lines changed: 43535 additions & 41315 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Language: Cpp
3-
Standard: Cpp03
3+
Standard: c++14
44

55

66
# The following is close to the style we've been using all these years

.clang-tidy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Checks: >
33
-*,
44
bugprone-*,
55
-bugprone-branch-clone,
6+
-bugprone-easily-swappable-parameters,
7+
-bugprone-implicit-widening-of-multiplication-result,
68
-bugprone-macro-parentheses,
79
-bugprone-narrowing-conversions,
810
clang-analyzer-*,
@@ -22,6 +24,7 @@ Checks: >
2224
-cppcoreguidelines-narrowing-conversions,
2325
-cppcoreguidelines-non-private-member-variables-in-classes,
2426
-cppcoreguidelines-owning-memory,
27+
-cppcoreguidelines-prefer-member-initializer,
2528
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
2629
-cppcoreguidelines-pro-bounds-constant-array-index,
2730
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
@@ -36,6 +39,7 @@ Checks: >
3639
modernize-*,
3740
-modernize-avoid-c-arrays,
3841
-modernize-make-shared,
42+
-modernize-return-braced-init-list,
3943
-modernize-use-trailing-return-type,
4044
-modernize-use-using,
4145
performance-*,
@@ -50,6 +54,7 @@ Checks: >
5054
-readability-magic-numbers,
5155
-readability-named-parameter,
5256
-readability-simplify-boolean-expr,
57+
-readability-suspicious-call-argument,
5358
-readability-use-anyofallof,
5459
HeaderFilterRegex: '.*'
5560
FormatStyle: file

.github/workflows/cmake.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,24 @@ jobs:
88
- name: Setup
99
run: |
1010
sudo apt update
11-
sudo apt install -y libboost-dev
11+
sudo apt install -y libboost-dev ccache
12+
- name: Cache
13+
uses: hendrikmuhs/ccache-action@v1.2
14+
with:
15+
key: cmake-linux-ci-build-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
16+
restore-keys: |
17+
cmake-linux-ci-build-${{ github.ref }}-${{ github.head_ref }}-
18+
cmake-linux-ci-build-${{ github.ref }}-
19+
cmake-linux-ci-build-refs/heads/master-
20+
cmake-linux-ci-build-
1221
- name: Compile
1322
env:
1423
CXXFLAGS: -O2
1524
run: |
1625
mkdir build
1726
cd build
18-
cmake -DBOOST_ROOT=/usr ..
19-
make -j 2
27+
cmake .. -DBOOST_ROOT=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
28+
cmake --build . -j2
2029
- name: Test
2130
run: |
2231
cd build
@@ -28,7 +37,16 @@ jobs:
2837
- name: Setup
2938
run: |
3039
sudo apt update
31-
sudo apt install -y libboost-all-dev
40+
sudo apt install -y libboost-all-dev ccache
41+
- name: Cache
42+
uses: hendrikmuhs/ccache-action@v1.2
43+
with:
44+
key: cmake-linux-ci-opts-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
45+
restore-keys: |
46+
cmake-linux-ci-opts-${{ github.ref }}-${{ github.head_ref }}-
47+
cmake-linux-ci-opts-${{ github.ref }}-
48+
cmake-linux-ci-opts-refs/heads/master-
49+
cmake-linux-ci-opts-
3250
- name: Compile
3351
env:
3452
CXXFLAGS: -O2
@@ -85,15 +103,24 @@ jobs:
85103
- uses: actions/checkout@v3
86104
- name: Setup
87105
run: |
88-
brew install boost
106+
brew install boost ccache
107+
- name: Cache
108+
uses: hendrikmuhs/ccache-action@v1.2
109+
with:
110+
key: cmake-macos-ci-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
111+
restore-keys: |
112+
cmake-macos-ci-${{ github.ref }}-${{ github.head_ref }}-
113+
cmake-macos-ci-${{ github.ref }}-
114+
cmake-macos-ci-refs/heads/master-
115+
cmake-macos-ci-
89116
- name: Compile
90117
env:
91118
CXXFLAGS: -O2 -stdlib=libc++ -mmacosx-version-min=10.9
92119
run: |
93120
mkdir build
94121
cd build
95-
cmake ..
96-
make -j 2
122+
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
123+
cmake --build . -j2
97124
- name: Test
98125
run: |
99126
cd build

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
# or to provide custom queries or build logic.
66
name: "CodeQL"
77

8-
on: workflow_dispatch
8+
on:
9+
schedule:
10+
- cron: '0 0 * * 0'
11+
workflow_dispatch:
912

1013
jobs:
1114
analyze:

.github/workflows/linux-full-tests.yml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ jobs:
77
fail-fast: false
88
matrix:
99
include:
10-
- name: "gcc 4.8 (Boost 1.48)"
11-
shortname: gcc4
12-
tag: trusty
13-
cc: gcc
14-
cxx: g++
1510
- name: "gcc 5.4 (Boost 1.66)"
1611
shortname: gcc5
1712
tag: xenial
@@ -37,14 +32,19 @@ jobs:
3732
tag: focal
3833
cc: gcc
3934
cxx: g++
40-
- name: "gcc 10.x"
35+
- name: "gcc 10.3 (Boost 1.79)"
4136
shortname: gcc10
4237
tag: hirsute
4338
cc: gcc
4439
cxx: g++
4540
- name: "gcc 11.x"
4641
shortname: gcc11
47-
tag: impish
42+
tag: jammy
43+
cc: gcc
44+
cxx: g++
45+
- name: "gcc 12.x"
46+
shortname: gcc12
47+
tag: kinetic
4848
cc: gcc
4949
cxx: g++
5050
- name: "Clang 6 (Boost 1.72)"
@@ -77,12 +77,12 @@ jobs:
7777
tag: groovy
7878
cc: clang
7979
cxx: clang++
80-
- name: "Clang 12"
80+
- name: "Clang 12 (Boost 1.79)"
8181
shortname: clang12
8282
tag: hirsute
8383
cc: clang
8484
cxx: clang++
85-
- name: "Clang 13"
85+
- name: "Clang 13 (Boost 1.79)"
8686
shortname: clang13
8787
tag: impish
8888
cc: clang
@@ -92,12 +92,6 @@ jobs:
9292
tag: jammy
9393
cc: clang
9494
cxx: clang++
95-
- name: "C++11 mode"
96-
shortname: c++11
97-
tag: rolling
98-
cc: gcc
99-
cxx: g++
100-
cxxflags: "-std=c++11 -Wno-cpp"
10195
- name: "C++14 mode"
10296
shortname: c++14
10397
tag: rolling
@@ -134,7 +128,7 @@ jobs:
134128
cc: gcc
135129
cxx: g++
136130
configureflags: --enable-indexed-coupons
137-
- name: "C++11 classes enabled"
131+
- name: "Standard Library classes enabled"
138132
shortname: stdclasses
139133
tag: rolling
140134
cc: gcc
@@ -174,15 +168,14 @@ jobs:
174168
steps:
175169
- uses: actions/checkout@v3
176170
- name: Cache
177-
uses: actions/cache@v3
171+
uses: hendrikmuhs/ccache-action@v1.2
178172
with:
179-
path: ~/.ccache
180-
key: linux-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
173+
key: linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
181174
restore-keys: |
182-
linux-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-
183-
linux-build-${{ matrix.shortname }}-${{ github.ref }}-
184-
linux-build-${{ matrix.shortname }}-refs/heads/master-
185-
linux-build-${{ matrix.shortname }}-
175+
linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-
176+
linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}-
177+
linux-ci-build-${{ matrix.shortname }}-refs/heads/master-
178+
linux-ci-build-${{ matrix.shortname }}-
186179
- name: Compiler version
187180
run: |
188181
${{ matrix.cc }} --version

.github/workflows/linux-nondefault.yml

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,19 @@ jobs:
3232
tag: focal
3333
cc: gcc
3434
cxx: g++
35-
- name: "gcc 10.x"
35+
- name: "gcc 10.3 (Boost 1.79)"
3636
shortname: gcc10
3737
tag: hirsute
3838
cc: gcc
3939
cxx: g++
4040
- name: "gcc 11.x"
4141
shortname: gcc11
42-
tag: impish
42+
tag: jammy
43+
cc: gcc
44+
cxx: g++
45+
- name: "gcc 12.x"
46+
shortname: gcc12
47+
tag: kinetic
4348
cc: gcc
4449
cxx: g++
4550
- name: "Clang 6 (Boost 1.72)"
@@ -72,12 +77,12 @@ jobs:
7277
tag: groovy
7378
cc: clang
7479
cxx: clang++
75-
- name: "Clang 12"
80+
- name: "Clang 12 (Boost 1.79)"
7681
shortname: clang12
7782
tag: hirsute
7883
cc: clang
7984
cxx: clang++
80-
- name: "Clang 13"
85+
- name: "Clang 13 (Boost 1.79)"
8186
shortname: clang13
8287
tag: impish
8388
cc: clang
@@ -87,12 +92,6 @@ jobs:
8792
tag: jammy
8893
cc: clang
8994
cxx: clang++
90-
- name: "C++11 mode"
91-
shortname: c++11
92-
tag: rolling
93-
cc: gcc
94-
cxx: g++
95-
cxxflags: "-std=c++11"
9695
- name: "C++14 mode"
9796
shortname: c++14
9897
tag: rolling
@@ -117,7 +116,7 @@ jobs:
117116
cc: gcc
118117
cxx: g++
119118
configureflags: --enable-unity-build
120-
- name: "C++11 classes enabled"
119+
- name: "Standard Library classes enabled"
121120
shortname: stdclasses
122121
tag: rolling
123122
cc: gcc
@@ -133,23 +132,13 @@ jobs:
133132
container: ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }}
134133
steps:
135134
- uses: actions/checkout@v3
136-
- name: Cache
137-
uses: actions/cache@v3
138-
with:
139-
path: ~/.ccache
140-
key: linux-nondef-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
141-
restore-keys: |
142-
linux-nondef-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-
143-
linux-nondef-build-${{ matrix.shortname }}-${{ github.ref }}-
144-
linux-nondef-build-${{ matrix.shortname }}-refs/heads/master-
145-
linux-nondef-build-${{ matrix.shortname }}-
146135
- name: Compiler version
147136
run: |
148137
${{ matrix.cc }} --version
149138
- name: Build
150139
run: |
151140
./autogen.sh
152-
./configure --disable-static --enable-error-lines --enable-error-functions --enable-tracing --enable-indexed-coupons --enable-extra-safety-checks --enable-sessions --enable-thread-safe-observer-pattern --enable-intraday --enable-null-as-functions ${{ matrix.configureflags }} CC="ccache ${{ matrix.cc }}" CXX="ccache ${{ matrix.cxx }}" CXXFLAGS="-O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }}"
141+
./configure --disable-static --enable-error-lines --enable-error-functions --enable-tracing --enable-indexed-coupons --enable-extra-safety-checks --enable-sessions --enable-thread-safe-observer-pattern --enable-intraday --enable-null-as-functions ${{ matrix.configureflags }} CC="${{ matrix.cc }}" CXX="${{ matrix.cxx }}" CXXFLAGS="-O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }}"
153142
make -j 2
154143
- name: Run tests
155144
run: |

.github/workflows/linux.yml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ jobs:
77
fail-fast: false
88
matrix:
99
include:
10-
- name: "gcc 4.8 (Boost 1.48)"
11-
shortname: gcc4
12-
tag: trusty
13-
cc: gcc
14-
cxx: g++
1510
- name: "gcc 5.4 (Boost 1.66)"
1611
shortname: gcc5
1712
tag: xenial
@@ -37,14 +32,20 @@ jobs:
3732
tag: focal
3833
cc: gcc
3934
cxx: g++
40-
- name: "gcc 10.x"
35+
- name: "gcc 10.3 (Boost 1.79)"
4136
shortname: gcc10
4237
tag: hirsute
4338
cc: gcc
4439
cxx: g++
4540
- name: "gcc 11.x"
4641
shortname: gcc11
47-
tag: impish
42+
tag: jammy
43+
cc: gcc
44+
cxx: g++
45+
tests: true
46+
- name: "gcc 12.x"
47+
shortname: gcc12
48+
tag: kinetic
4849
cc: gcc
4950
cxx: g++
5051
tests: true
@@ -78,12 +79,12 @@ jobs:
7879
tag: groovy
7980
cc: clang
8081
cxx: clang++
81-
- name: "Clang 12"
82+
- name: "Clang 12 (Boost 1.79)"
8283
shortname: clang12
8384
tag: hirsute
8485
cc: clang
8586
cxx: clang++
86-
- name: "Clang 13"
87+
- name: "Clang 13 (Boost 1.79)"
8788
shortname: clang13
8889
tag: impish
8990
cc: clang
@@ -94,12 +95,6 @@ jobs:
9495
cc: clang
9596
cxx: clang++
9697
tests: true
97-
- name: "C++11 mode"
98-
shortname: c++11
99-
tag: rolling
100-
cc: gcc
101-
cxx: g++
102-
cxxflags: "-std=c++11 -Wno-cpp"
10398
- name: "C++14 mode"
10499
shortname: c++14
105100
tag: rolling
@@ -138,7 +133,7 @@ jobs:
138133
cxx: g++
139134
configureflags: --enable-indexed-coupons
140135
tests: true
141-
- name: "C++11 classes enabled"
136+
- name: "Standard Library classes enabled"
142137
shortname: stdclasses
143138
tag: rolling
144139
cc: gcc
@@ -191,15 +186,14 @@ jobs:
191186
steps:
192187
- uses: actions/checkout@v3
193188
- name: Cache
194-
uses: actions/cache@v3
189+
uses: hendrikmuhs/ccache-action@v1.2
195190
with:
196-
path: ~/.ccache
197-
key: linux-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
191+
key: linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
198192
restore-keys: |
199-
linux-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-
200-
linux-build-${{ matrix.shortname }}-${{ github.ref }}-
201-
linux-build-${{ matrix.shortname }}-refs/heads/master-
202-
linux-build-${{ matrix.shortname }}-
193+
linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-
194+
linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}-
195+
linux-ci-build-${{ matrix.shortname }}-refs/heads/master-
196+
linux-ci-build-${{ matrix.shortname }}-
203197
- name: Compiler version
204198
run: |
205199
${{ matrix.cc }} --version

0 commit comments

Comments
 (0)