summaryrefslogtreecommitdiffstats
path: root/c_layer/survival_curve.hpp
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2023-12-05 17:03:49 -0500
committerGuillaume Horel <guillaume.horel@gmail.com>2023-12-05 17:08:46 -0500
commit73cbe54cd2c4319e4458f8c8d6d483bcfe6e567a (patch)
tree89312fff14303dd499326b5b4529f9eed632e56e /c_layer/survival_curve.hpp
parent52f2fa76189b4272a2c40b3575f1305e8fcab061 (diff)
downloadpyisda-73cbe54cd2c4319e4458f8c8d6d483bcfe6e567a.tar.gz
get rid of the defaulted vector
Diffstat (limited to 'c_layer/survival_curve.hpp')
-rw-r--r--c_layer/survival_curve.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/c_layer/survival_curve.hpp b/c_layer/survival_curve.hpp
index 2275d9a..e6ee4f2 100644
--- a/c_layer/survival_curve.hpp
+++ b/c_layer/survival_curve.hpp
@@ -1,5 +1,6 @@
#include <string_view>
#include <cstdint>
+#include <isda/bastypes.h>
struct CurveName {
enum class Seniority: std::uint8_t {
@@ -65,6 +66,10 @@ struct CurveName {
}
}
+ inline TDate* defaulted() {
+ return (TDate*)(name - sizeof(TDate));
+ }
+
const char* name;
std::string_view ticker;
Seniority seniority;