lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 110906f 4/4: Prefer brace initialization


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 110906f 4/4: Prefer brace initialization
Date: Mon, 28 Jan 2019 18:53:15 -0500 (EST)

branch: master
commit 110906f161d2bc9b3388e2b696cdc9bb4f27dd92
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Prefer brace initialization
    
    Brace initialization permits elision of an argument type, e.g.:
    -    Add(database_entity(DB_MinInputCoiMult       , 1.0));
    +    Add({DB_MinInputCoiMult       , 1.0});
    These changes were almost all mechanical, but changes such as this:
    (formatting compressed somewhat):
    - Add(...(DB_CoiResetMinDate, gregorian_epoch().julian_day_number()));
    + Add({DB_CoiResetMinDate, calendar_date::gregorian_epoch_jdn});
    required manual intervention to avoid potential narrowing.
---
 dbdict.cpp | 776 +++++++++++++++++++++++++++++--------------------------------
 1 file changed, 375 insertions(+), 401 deletions(-)

diff --git a/dbdict.cpp b/dbdict.cpp
index c6dd400..b6046a2 100644
--- a/dbdict.cpp
+++ b/dbdict.cpp
@@ -519,37 +519,31 @@ void DBDictionary::InitDB()
 
     for(auto const& i : member_names())
         {
-        Add(database_entity(db_key_from_name(i), 0.0));
+        Add({db_key_from_name(i), 0.0});
         }
 
     // It would be dangerous to set these to zero.
-    Add(database_entity(DB_MinInputCoiMult       , 1.0));
-    Add(database_entity(DB_CurrCoiMultiplier     , 1.0));
-    Add(database_entity(DB_GuarCoiMultiplier     , 1.0));
-    Add(database_entity(DB_SubstdTableMult       , 1.0));
-    Add(database_entity(DB_MaxWdGenAcctValMult   , 1.0));
-    Add(database_entity(DB_MaxWdSepAcctValMult   , 1.0));
+    Add({DB_MinInputCoiMult       , 1.0});
+    Add({DB_CurrCoiMultiplier     , 1.0});
+    Add({DB_GuarCoiMultiplier     , 1.0});
+    Add({DB_SubstdTableMult       , 1.0});
+    Add({DB_MaxWdGenAcctValMult   , 1.0});
+    Add({DB_MaxWdSepAcctValMult   , 1.0});
 
     // This is determined by law and regulation, and should be the
     // same for all life-insurance products.
     int ptd[e_number_of_axes] = {1, 1, 1, 1, 1, e_max_dim_state, 1};
     std::vector<int> premium_tax_dimensions(ptd, ptd + e_number_of_axes);
-    Add
-        (database_entity
-            (DB_PremTaxRate
-            ,premium_tax_dimensions
-            ,premium_tax_rates_for_life_insurance()
-            )
-        );
+    Add({DB_PremTaxRate, premium_tax_dimensions, 
premium_tax_rates_for_life_insurance()});
 
     // These are the same as class date_trammel's nominal limits.
-    Add(database_entity(DB_CoiResetMinDate       , 
gregorian_epoch().julian_day_number()));
-    Add(database_entity(DB_CoiResetMaxDate       , last_yyyy_date 
().julian_day_number()));
+    Add({DB_CoiResetMinDate       , calendar_date::gregorian_epoch_jdn});
+    Add({DB_CoiResetMaxDate       , calendar_date::last_yyyy_date_jdn });
 
     // Usually the maximum is a reciprocal, e.g., 1/11 or 1/12; for
     // greatest precision, store the reciprocal of that reciprocal,
     // e.g., 11 or 12.
-    Add(database_entity(DB_MaxMonthlyCoiRate     , 12.0));
+    Add({DB_MaxMonthlyCoiRate     , 12.0});
 
     // This must not be zero in TX, which specifically requires a
     // "guaranteed" rate of not more than fifteen percent--see:
@@ -562,29 +556,29 @@ void DBDictionary::InitDB()
     std::vector<int> max_vlr_dimensions(mvd, mvd + e_number_of_axes);
     std::vector<double> max_vlr(e_max_dim_state);
     max_vlr[mce_s_TX] = 0.15;
-    Add(database_entity(DB_MaxVlrRate, max_vlr_dimensions, max_vlr));
+    Add({DB_MaxVlrRate, max_vlr_dimensions, max_vlr});
 
-    Add(database_entity(DB_FirstPrefLoanYear     , 100));
+    Add({DB_FirstPrefLoanYear     , 100});
 
-    Add(database_entity(DB_GuarIntSpread         , dbl_inf));
+    Add({DB_GuarIntSpread         , dbl_inf});
 
-    Add(database_entity(DB_CurrCoiTable0Limit    , dbl_inf));
-    Add(database_entity(DB_CurrCoiTable1         , 999));
-    Add(database_entity(DB_CurrCoiTable1Limit    , dbl_inf));
-    Add(database_entity(DB_CurrCoiTable2         , 999));
+    Add({DB_CurrCoiTable0Limit    , dbl_inf});
+    Add({DB_CurrCoiTable1         , 999});
+    Add({DB_CurrCoiTable1Limit    , dbl_inf});
+    Add({DB_CurrCoiTable2         , 999});
 
-    Add(database_entity(DB_SpecAmtLoadLimit      , dbl_inf));
-    Add(database_entity(DB_DynSepAcctLoadLimit   , dbl_inf));
-    Add(database_entity(DB_PremTaxRetalLimit     , dbl_inf));
-    Add(database_entity(DB_WpLimit               , dbl_inf));
-    Add(database_entity(DB_AdbLimit              , dbl_inf));
-    Add(database_entity(DB_ExpSpecAmtLimit       , dbl_inf));
+    Add({DB_SpecAmtLoadLimit      , dbl_inf});
+    Add({DB_DynSepAcctLoadLimit   , dbl_inf});
+    Add({DB_PremTaxRetalLimit     , dbl_inf});
+    Add({DB_WpLimit               , dbl_inf});
+    Add({DB_AdbLimit              , dbl_inf});
+    Add({DB_ExpSpecAmtLimit       , dbl_inf});
 
     // These are the same as the nominal limits of the associated
     // members of class Input.
-    Add(database_entity(DB_SpouseRiderMaxAmt     , bignum));
-    Add(database_entity(DB_SpouseRiderMaxIssAge  , 99));
-    Add(database_entity(DB_ChildRiderMaxAmt      , bignum));
+    Add({DB_SpouseRiderMaxAmt     , bignum});
+    Add({DB_SpouseRiderMaxIssAge  , 99});
+    Add({DB_ChildRiderMaxAmt      , bignum});
 }
 
 void DBDictionary::write_database_files()
@@ -592,58 +586,58 @@ void DBDictionary::write_database_files()
     DBDictionary z;
 
     z.InitDB();
-    z.Add(database_entity(DB_GuarMonthlyPolFee   , 8.00));
-    z.Add(database_entity(DB_GuarSpecAmtLoad     , 0.0));
-    z.Add(database_entity(DB_GuarAnnualPolFee    , 0.0));
-    z.Add(database_entity(DB_GuarFundAdminChg    , 0.0));
-    z.Add(database_entity(DB_GuarPremLoadTgt     , 0.07));
-    z.Add(database_entity(DB_GuarPremLoadExc     , 0.04));
-    z.Add(database_entity(DB_GuarPremLoadTgtRfd  , 0.00));
-    z.Add(database_entity(DB_GuarPremLoadExcRfd  , 0.00));
-    z.Add(database_entity(DB_GuarAcctValLoad     , 0.0));
-    z.Add(database_entity(DB_CurrMonthlyPolFee   , 5.00));
-    z.Add(database_entity(DB_CurrSpecAmtLoad     , 0.0));
-    z.Add(database_entity(DB_CurrAnnualPolFee    , 0.0));
-    z.Add(database_entity(DB_CurrFundAdminChg    , 0.0));
-    z.Add(database_entity(DB_CurrPremLoadTgt     , 0.05));
-    z.Add(database_entity(DB_CurrPremLoadExc     , 0.02));
-    z.Add(database_entity(DB_CurrPremLoadTgtRfd  , 0.00));
-    z.Add(database_entity(DB_CurrPremLoadExcRfd  , 0.00));
-    z.Add(database_entity(DB_CurrAcctValLoad     , 0.0));
-    z.Add(database_entity(DB_DacTaxPremLoad      , 0.01));
-    z.Add(database_entity(DB_FundCharge          , 0.0));
-    z.Add(database_entity(DB_PremTaxFundCharge   , 0.0));
-    z.Add(database_entity(DB_DacTaxFundCharge    , 0.0));
-    z.Add(database_entity(DB_WaivePremTaxInt1035 , true));
-    z.Add(database_entity(DB_FirstWdMonth        , 0.0));
-    z.Add(database_entity(DB_MaxWdDed            , mce_to_next_anniversary));
-    z.Add(database_entity(DB_MinWd               , 100.0));
-    z.Add(database_entity(DB_WdFee               , 25.0));
-    z.Add(database_entity(DB_WdFeeRate           , 0.02));
-    z.Add(database_entity(DB_WdDecrSpecAmtDboLvl , true));
-    z.Add(database_entity(DB_WdDecrSpecAmtDboInc , true));
-    z.Add(database_entity(DB_WdDecrSpecAmtDboRop , true));
-    z.Add(database_entity(DB_FirstLoanMonth      , 0.0));
-    z.Add(database_entity(DB_AllowPrefLoan       , false));
-    z.Add(database_entity(DB_AllowFixedLoan      , true));
-    z.Add(database_entity(DB_FixedLoanRate       , 0.06));
-    z.Add(database_entity(DB_AllowVlr            , true));
-    z.Add(database_entity(DB_MaxLoanAcctValMult  , 1.0));
-    z.Add(database_entity(DB_MaxLoanDed          , mce_to_next_anniversary));
-    z.Add(database_entity(DB_GuarPrefLoanSpread  , 0.0));
-    z.Add(database_entity(DB_GuarRegLoanSpread   , 0.04));
-    z.Add(database_entity(DB_CurrPrefLoanSpread  , 0.0));
-    z.Add(database_entity(DB_CurrRegLoanSpread   , 0.02));
-    z.Add(database_entity(DB_GuarInt             , 0.03));
-    z.Add(database_entity(DB_NaarDiscount        , 0.00246627));
-    z.Add(database_entity(DB_GuarIntSpread       , 0.03));
-    z.Add(database_entity(DB_GuarMandE           , 0.009));
-    z.Add(database_entity(DB_CurrIntSpread       , 0.01));
-    z.Add(database_entity(DB_CurrMandE           , 0.009));
-    z.Add(database_entity(DB_BonusInt            , 0.0));
-    z.Add(database_entity(DB_IntFloor            , 0.0));
-    z.Add(database_entity(DB_SepAcctSpreadMethod , 
mce_spread_is_effective_annual));
-    z.Add(database_entity(DB_DynamicMandE        , false));
+    z.Add({DB_GuarMonthlyPolFee   , 8.00});
+    z.Add({DB_GuarSpecAmtLoad     , 0.0});
+    z.Add({DB_GuarAnnualPolFee    , 0.0});
+    z.Add({DB_GuarFundAdminChg    , 0.0});
+    z.Add({DB_GuarPremLoadTgt     , 0.07});
+    z.Add({DB_GuarPremLoadExc     , 0.04});
+    z.Add({DB_GuarPremLoadTgtRfd  , 0.00});
+    z.Add({DB_GuarPremLoadExcRfd  , 0.00});
+    z.Add({DB_GuarAcctValLoad     , 0.0});
+    z.Add({DB_CurrMonthlyPolFee   , 5.00});
+    z.Add({DB_CurrSpecAmtLoad     , 0.0});
+    z.Add({DB_CurrAnnualPolFee    , 0.0});
+    z.Add({DB_CurrFundAdminChg    , 0.0});
+    z.Add({DB_CurrPremLoadTgt     , 0.05});
+    z.Add({DB_CurrPremLoadExc     , 0.02});
+    z.Add({DB_CurrPremLoadTgtRfd  , 0.00});
+    z.Add({DB_CurrPremLoadExcRfd  , 0.00});
+    z.Add({DB_CurrAcctValLoad     , 0.0});
+    z.Add({DB_DacTaxPremLoad      , 0.01});
+    z.Add({DB_FundCharge          , 0.0});
+    z.Add({DB_PremTaxFundCharge   , 0.0});
+    z.Add({DB_DacTaxFundCharge    , 0.0});
+    z.Add({DB_WaivePremTaxInt1035 , true});
+    z.Add({DB_FirstWdMonth        , 0.0});
+    z.Add({DB_MaxWdDed            , mce_to_next_anniversary});
+    z.Add({DB_MinWd               , 100.0});
+    z.Add({DB_WdFee               , 25.0});
+    z.Add({DB_WdFeeRate           , 0.02});
+    z.Add({DB_WdDecrSpecAmtDboLvl , true});
+    z.Add({DB_WdDecrSpecAmtDboInc , true});
+    z.Add({DB_WdDecrSpecAmtDboRop , true});
+    z.Add({DB_FirstLoanMonth      , 0.0});
+    z.Add({DB_AllowPrefLoan       , false});
+    z.Add({DB_AllowFixedLoan      , true});
+    z.Add({DB_FixedLoanRate       , 0.06});
+    z.Add({DB_AllowVlr            , true});
+    z.Add({DB_MaxLoanAcctValMult  , 1.0});
+    z.Add({DB_MaxLoanDed          , mce_to_next_anniversary});
+    z.Add({DB_GuarPrefLoanSpread  , 0.0});
+    z.Add({DB_GuarRegLoanSpread   , 0.04});
+    z.Add({DB_CurrPrefLoanSpread  , 0.0});
+    z.Add({DB_CurrRegLoanSpread   , 0.02});
+    z.Add({DB_GuarInt             , 0.03});
+    z.Add({DB_NaarDiscount        , 0.00246627});
+    z.Add({DB_GuarIntSpread       , 0.03});
+    z.Add({DB_GuarMandE           , 0.009});
+    z.Add({DB_CurrIntSpread       , 0.01});
+    z.Add({DB_CurrMandE           , 0.009});
+    z.Add({DB_BonusInt            , 0.0});
+    z.Add({DB_IntFloor            , 0.0});
+    z.Add({DB_SepAcctSpreadMethod , mce_spread_is_effective_annual});
+    z.Add({DB_DynamicMandE        , false});
 
     // gender, smoker
     int dims313[e_number_of_axes] = {3, 1, 3, 1, 1, 1, 1};
@@ -660,10 +654,10 @@ void DBDictionary::write_database_files()
 
     // For now at least, just use (a multiple of) guaranteed COI rates
     // as current.
-    z.Add(database_entity(DB_CurrCoiTable, e_number_of_axes, dims313, TgCOI));
-    z.Add(database_entity(DB_GuarCoiTable, e_number_of_axes, dims313, TgCOI));
+    z.Add({DB_CurrCoiTable, e_number_of_axes, dims313, TgCOI});
+    z.Add({DB_GuarCoiTable, e_number_of_axes, dims313, TgCOI});
 
-    z.Add(database_entity(DB_CoiNyMinTable       , 0.0));
+    z.Add({DB_CoiNyMinTable       , 0.0});
 
     double coimult[9] =
         {
@@ -671,65 +665,65 @@ void DBDictionary::write_database_files()
         0.60, 0.50, 0.55, // male:   sm ns us
         0.50, 0.40, 0.45, // unisex: sm ns us
         };
-    z.Add(database_entity(DB_CurrCoiMultiplier, e_number_of_axes, dims313, 
coimult));
-
-    z.Add(database_entity(DB_UseNyCoiFloor       , 0.0));
-    z.Add(database_entity(DB_GuarCoiCeiling      , 0.0));
-    z.Add(database_entity(DB_CoiGuarIsMin        , 0.0));
-    z.Add(database_entity(DB_CoiSnflIsGuar       , 0.0));
-    z.Add(database_entity(DB_CurrCoiIsAnnual     , true));
-    z.Add(database_entity(DB_GuarCoiIsAnnual     , true));
-    z.Add(database_entity(DB_MdptCoiIsAnnual     , true));
-    z.Add(database_entity(DB_AgeLastOrNearest    , oe_age_last_birthday));
-    z.Add(database_entity(DB_AllowRetirees       , true));
-    z.Add(database_entity(DB_MinSpecAmt          , 100000.0));
+    z.Add({DB_CurrCoiMultiplier, e_number_of_axes, dims313, coimult});
+
+    z.Add({DB_UseNyCoiFloor       , 0.0});
+    z.Add({DB_GuarCoiCeiling      , 0.0});
+    z.Add({DB_CoiGuarIsMin        , 0.0});
+    z.Add({DB_CoiSnflIsGuar       , 0.0});
+    z.Add({DB_CurrCoiIsAnnual     , true});
+    z.Add({DB_GuarCoiIsAnnual     , true});
+    z.Add({DB_MdptCoiIsAnnual     , true});
+    z.Add({DB_AgeLastOrNearest    , oe_age_last_birthday});
+    z.Add({DB_AllowRetirees       , true});
+    z.Add({DB_MinSpecAmt          , 100000.0});
     // Forbid substandard table ratings with simplified or guaranteed issue.
     int dim_uw_basis[e_number_of_axes] = {1, 1, 1, 1, 5, 1, 1};
     //                              med  para nonmed   SI     GI
     double allow_substd_table[] = {true, true, true, false, false};
-    z.Add(database_entity(DB_AllowSubstdTable, e_number_of_axes, dim_uw_basis, 
allow_substd_table));
-    z.Add(database_entity(DB_AllowFlatExtras     , true));
-    z.Add(database_entity(DB_MinIssAge           , 15));
-    z.Add(database_entity(DB_MaxIssAge           , 70));
-    z.Add(database_entity(DB_MinIssSpecAmt       , 50000.0));
-    z.Add(database_entity(DB_MinIssBaseSpecAmt   , 50000.0));
-    z.Add(database_entity(DB_MaxIssSpecAmt       , 10000000.0));
-    z.Add(database_entity(DB_MinRenlSpecAmt      , 50000.0));
-    z.Add(database_entity(DB_MinRenlBaseSpecAmt  , 50000.0));
-    z.Add(database_entity(DB_MaxRenlSpecAmt      , 10000000.0));
-    z.Add(database_entity(DB_MinSpecAmtIncr      , 0.0));
-    z.Add(database_entity(DB_MaxIncrAge          , 99));
-    z.Add(database_entity(DB_MinPmt              , 0.0));
-    z.Add(database_entity(DB_SmokeOrTobacco      , oe_tobacco_nontobacco));
-    z.Add(database_entity(DB_AllowUnisex         , true));
-    z.Add(database_entity(DB_AllowSexDistinct    , true));
-    z.Add(database_entity(DB_AllowUnismoke       , true));
-    z.Add(database_entity(DB_AllowSmokeDistinct  , true));
-    z.Add(database_entity(DB_AllowFullUw         , true));
-    z.Add(database_entity(DB_AllowParamedUw      , true));
-    z.Add(database_entity(DB_AllowNonmedUw       , true));
-    z.Add(database_entity(DB_AllowSimpUw         , true));
-    z.Add(database_entity(DB_AllowGuarUw         , true));
-    z.Add(database_entity(DB_AllowMortBlendSex   , true));
-    z.Add(database_entity(DB_AllowMortBlendSmoke , true));
-    z.Add(database_entity(DB_AllowRatedWp        , false));
-    z.Add(database_entity(DB_AllowRatedAdb       , false));
-    z.Add(database_entity(DB_AllowRatedTerm      , true));
-    z.Add(database_entity(DB_Allowable           , true));
-    z.Add(database_entity(DB_AllowPreferredClass , true));
-    z.Add(database_entity(DB_AllowCvat           , true));
-    z.Add(database_entity(DB_AllowGpt            , true));
-
-    z.Add(database_entity(DB_CorridorWhence      , 1));
-    z.Add(database_entity(DB_Irc7702NspWhence    , 2));
-    z.Add(database_entity(DB_SevenPayWhence      , 1));
+    z.Add({DB_AllowSubstdTable, e_number_of_axes, dim_uw_basis, 
allow_substd_table});
+    z.Add({DB_AllowFlatExtras     , true});
+    z.Add({DB_MinIssAge           , 15});
+    z.Add({DB_MaxIssAge           , 70});
+    z.Add({DB_MinIssSpecAmt       , 50000.0});
+    z.Add({DB_MinIssBaseSpecAmt   , 50000.0});
+    z.Add({DB_MaxIssSpecAmt       , 10000000.0});
+    z.Add({DB_MinRenlSpecAmt      , 50000.0});
+    z.Add({DB_MinRenlBaseSpecAmt  , 50000.0});
+    z.Add({DB_MaxRenlSpecAmt      , 10000000.0});
+    z.Add({DB_MinSpecAmtIncr      , 0.0});
+    z.Add({DB_MaxIncrAge          , 99});
+    z.Add({DB_MinPmt              , 0.0});
+    z.Add({DB_SmokeOrTobacco      , oe_tobacco_nontobacco});
+    z.Add({DB_AllowUnisex         , true});
+    z.Add({DB_AllowSexDistinct    , true});
+    z.Add({DB_AllowUnismoke       , true});
+    z.Add({DB_AllowSmokeDistinct  , true});
+    z.Add({DB_AllowFullUw         , true});
+    z.Add({DB_AllowParamedUw      , true});
+    z.Add({DB_AllowNonmedUw       , true});
+    z.Add({DB_AllowSimpUw         , true});
+    z.Add({DB_AllowGuarUw         , true});
+    z.Add({DB_AllowMortBlendSex   , true});
+    z.Add({DB_AllowMortBlendSmoke , true});
+    z.Add({DB_AllowRatedWp        , false});
+    z.Add({DB_AllowRatedAdb       , false});
+    z.Add({DB_AllowRatedTerm      , true});
+    z.Add({DB_Allowable           , true});
+    z.Add({DB_AllowPreferredClass , true});
+    z.Add({DB_AllowCvat           , true});
+    z.Add({DB_AllowGpt            , true});
+
+    z.Add({DB_CorridorWhence      , 1});
+    z.Add({DB_Irc7702NspWhence    , 2});
+    z.Add({DB_SevenPayWhence      , 1});
     // This is just a sample product, so make do with plausible
     // all-male seven-pay premiums, and use GPT corridor factors for
     // CVAT. 'Irc7702NspWhence' specifies that NSP is calculated as
     // the reciprocal of corridor, so no NSP table is needed.
-    z.Add(database_entity(DB_CorridorTable       , 7));
-    z.Add(database_entity(DB_Irc7702NspTable     , 0));
-    z.Add(database_entity(DB_SevenPayTable       , 10));
+    z.Add({DB_CorridorTable       , 7});
+    z.Add({DB_Irc7702NspTable     , 0});
+    z.Add({DB_SevenPayTable       , 10});
 
     // Following IRS Notice 88-128, use only the male and female
     // tables with no smoker distinction, and a unisex table where
@@ -740,65 +734,53 @@ void DBDictionary::write_database_files()
     // which contains a numerical error but was adopted by NAIC.
     int dims311[e_number_of_axes] = {3, 1, 1, 1, 1, 1, 1}; // gender
     double T7702q[9] = {35, 41, 107,}; // Female, male, unisex.
-    z.Add(database_entity(DB_Irc7702QTable, e_number_of_axes, dims311, 
T7702q));
-
-    z.Add(database_entity(DB_AllowDboLvl         , true));
-    z.Add(database_entity(DB_AllowDboInc         , true));
-    z.Add(database_entity(DB_AllowDboRop         , true));
-    z.Add(database_entity(DB_AllowDboMdb         , true));
-    z.Add(database_entity(DB_DboLvlChangeToWhat  , 0b1111));
-    z.Add(database_entity(DB_DboLvlChangeMethod  , 0b1111));
-    z.Add(database_entity(DB_DboIncChangeToWhat  , 0b1111));
-    z.Add(database_entity(DB_DboIncChangeMethod  , 0b1111));
-    z.Add(database_entity(DB_DboRopChangeToWhat  , 0b1111));
-    z.Add(database_entity(DB_DboRopChangeMethod  , 0b1111));
-    z.Add(database_entity(DB_DboMdbChangeToWhat  , 0b1111));
-    z.Add(database_entity(DB_DboMdbChangeMethod  , 0b1111));
-    z.Add(database_entity(DB_DboChgCanIncrSpecAmt, true));
-    z.Add(database_entity(DB_DboChgCanDecrSpecAmt, true));
-    z.Add(database_entity(DB_SnflQTable          , 0.0));
-    z.Add(database_entity(DB_SurrChgByFormula    , 0.0));
-    z.Add(database_entity(DB_SurrChgPeriod       , 0.0));
-    z.Add(database_entity(DB_SurrChgZeroDur      , 0.0));
-    z.Add(database_entity(DB_SurrChgNlpMult      , 0.0));
-    z.Add(database_entity(DB_SurrChgNlpMax       , 0.0));
-    z.Add(database_entity(DB_SurrChgEaMax        , 0.0));
-    z.Add(database_entity(DB_SurrChgAmort        , 0.0));
+    z.Add({DB_Irc7702QTable, e_number_of_axes, dims311, T7702q});
+
+    z.Add({DB_AllowDboLvl         , true});
+    z.Add({DB_AllowDboInc         , true});
+    z.Add({DB_AllowDboRop         , true});
+    z.Add({DB_AllowDboMdb         , true});
+    z.Add({DB_DboLvlChangeToWhat  , 0b1111});
+    z.Add({DB_DboLvlChangeMethod  , 0b1111});
+    z.Add({DB_DboIncChangeToWhat  , 0b1111});
+    z.Add({DB_DboIncChangeMethod  , 0b1111});
+    z.Add({DB_DboRopChangeToWhat  , 0b1111});
+    z.Add({DB_DboRopChangeMethod  , 0b1111});
+    z.Add({DB_DboMdbChangeToWhat  , 0b1111});
+    z.Add({DB_DboMdbChangeMethod  , 0b1111});
+    z.Add({DB_DboChgCanIncrSpecAmt, true});
+    z.Add({DB_DboChgCanDecrSpecAmt, true});
+    z.Add({DB_SnflQTable          , 0.0});
+    z.Add({DB_SurrChgByFormula    , 0.0});
+    z.Add({DB_SurrChgPeriod       , 0.0});
+    z.Add({DB_SurrChgZeroDur      , 0.0});
+    z.Add({DB_SurrChgNlpMult      , 0.0});
+    z.Add({DB_SurrChgNlpMax       , 0.0});
+    z.Add({DB_SurrChgEaMax        , 0.0});
+    z.Add({DB_SurrChgAmort        , 0.0});
 
     int ptd[e_number_of_axes] = {1, 1, 1, 1, 1, e_max_dim_state, 1};
     std::vector<int> premium_tax_dimensions(ptd, ptd + e_number_of_axes);
-    z.Add
-        (database_entity
-            (DB_PremTaxRate
-            ,premium_tax_dimensions
-            ,premium_tax_rates_for_life_insurance()
-            )
-        );
+    z.Add({DB_PremTaxRate, premium_tax_dimensions, 
premium_tax_rates_for_life_insurance()});
 
     // Use alternative policy form name in states beginning with "K".
     std::vector<double> alt_form(e_max_dim_state);
     alt_form[mce_s_KS] = true;
     alt_form[mce_s_KY] = true;
-    z.Add
-        (database_entity
-            (DB_UsePolicyFormAlt
-            ,premium_tax_dimensions
-            ,alt_form
-            )
-        );
-
-    z.Add(database_entity(DB_PremTaxState        , oe_ee_state));
-    z.Add(database_entity(DB_MaturityAge         , 100));
-    z.Add(database_entity(DB_AllowExtEndt        , true));
-    z.Add(database_entity(DB_MinPremType         , oe_monthly_deduction));
-    z.Add(database_entity(DB_TgtPremType         , oe_modal_nonmec));
-    z.Add(database_entity(DB_TgtPremFixedAtIssue , false));
-    z.Add(database_entity(DB_TgtPremIgnoreSubstd , true));
-    z.Add(database_entity(DB_NoLapseMinDur       , 0.0));
-    z.Add(database_entity(DB_NoLapseMinAge       , 0.0));
-    z.Add(database_entity(DB_NoLapseUnratedOnly  , false));
-    z.Add(database_entity(DB_NoLapseDboLvlOnly   , false));
-    z.Add(database_entity(DB_LoadRfdProportion   , 0.0));
+    z.Add({DB_UsePolicyFormAlt, premium_tax_dimensions, alt_form});
+
+    z.Add({DB_PremTaxState        , oe_ee_state});
+    z.Add({DB_MaturityAge         , 100});
+    z.Add({DB_AllowExtEndt        , true});
+    z.Add({DB_MinPremType         , oe_monthly_deduction});
+    z.Add({DB_TgtPremType         , oe_modal_nonmec});
+    z.Add({DB_TgtPremFixedAtIssue , false});
+    z.Add({DB_TgtPremIgnoreSubstd , true});
+    z.Add({DB_NoLapseMinDur       , 0.0});
+    z.Add({DB_NoLapseMinAge       , 0.0});
+    z.Add({DB_NoLapseUnratedOnly  , false});
+    z.Add({DB_NoLapseDboLvlOnly   , false});
+    z.Add({DB_LoadRfdProportion   , 0.0});
 
     // uw_class, smoker
     int dims143[e_number_of_axes] = {1, 4, 3, 1, 1, 1, 1};
@@ -811,192 +793,184 @@ void DBDictionary::write_database_files()
         0, 0, 0, // ultra: sm ns us [zero: error message--no ultrapref class]
         };
 
-    z.Add(database_entity(DB_TermTable    , e_number_of_axes, dims143, TtCOI));
-    z.Add(database_entity(DB_GuarTermTable, e_number_of_axes, dims143, TtCOI));
-    z.Add(database_entity(DB_AllowTerm           , true));
-    z.Add(database_entity(DB_TermMinIssAge       , 15));
-    z.Add(database_entity(DB_TermMaxIssAge       , 65));
-    z.Add(database_entity(DB_TermForcedConvAge   , 70));
-    z.Add(database_entity(DB_TermForcedConvDur   , 10));
-    z.Add(database_entity(DB_MaxTermProportion   , 0.0));
-    z.Add(database_entity(DB_TermCoiRate         , 0.0));
-    z.Add(database_entity(DB_TermPremRate        , 0.0));
-    z.Add(database_entity(DB_WpTable             , 8));
-    z.Add(database_entity(DB_AllowWp             , true));
-    z.Add(database_entity(DB_WpMinIssAge         , 18));
-    z.Add(database_entity(DB_WpMaxIssAge         , 64));
-    z.Add(database_entity(DB_WpCoiRate           , 0.0));
-    z.Add(database_entity(DB_WpPremRate          , 0.0));
+    z.Add({DB_TermTable    , e_number_of_axes, dims143, TtCOI});
+    z.Add({DB_GuarTermTable, e_number_of_axes, dims143, TtCOI});
+    z.Add({DB_AllowTerm           , true});
+    z.Add({DB_TermMinIssAge       , 15});
+    z.Add({DB_TermMaxIssAge       , 65});
+    z.Add({DB_TermForcedConvAge   , 70});
+    z.Add({DB_TermForcedConvDur   , 10});
+    z.Add({DB_MaxTermProportion   , 0.0});
+    z.Add({DB_TermCoiRate         , 0.0});
+    z.Add({DB_TermPremRate        , 0.0});
+    z.Add({DB_WpTable             , 8});
+    z.Add({DB_AllowWp             , true});
+    z.Add({DB_WpMinIssAge         , 18});
+    z.Add({DB_WpMaxIssAge         , 64});
+    z.Add({DB_WpCoiRate           , 0.0});
+    z.Add({DB_WpPremRate          , 0.0});
     // SOA qx_ins table 708 is 70-75 US ADB experience.
-    z.Add(database_entity(DB_AdbTable            , 708));
-    z.Add(database_entity(DB_AllowAdb            , true));
-    z.Add(database_entity(DB_AdbMinIssAge        , 15));
-    z.Add(database_entity(DB_AdbMaxIssAge        , 70));
-    z.Add(database_entity(DB_AdbLimit            , 1000000.0));
-    z.Add(database_entity(DB_AdbCoiRate          , 0.0));
-    z.Add(database_entity(DB_AdbPremRate         , 0.0));
-    z.Add(database_entity(DB_WeightClass         , 0.0));
-    z.Add(database_entity(DB_WeightGender        , 0.0));
-    z.Add(database_entity(DB_WeightSmoking       , 0.0));
-    z.Add(database_entity(DB_WeightAge           , 0.0));
-    z.Add(database_entity(DB_WeightSpecAmt       , 0.0));
-    z.Add(database_entity(DB_WeightState         , 0.0));
-    z.Add(database_entity(DB_FullExpPol          , 0.0));
-    z.Add(database_entity(DB_FullExpPrem         , 0.0));
-    z.Add(database_entity(DB_FullExpDumpin       , 0.0));
-    z.Add(database_entity(DB_FullExpSpecAmt      , 0.0));
-    z.Add(database_entity(DB_VarExpPol           , 0.0));
-    z.Add(database_entity(DB_VarExpPrem          , 0.0));
-    z.Add(database_entity(DB_VarExpDumpin        , 0.0));
-    z.Add(database_entity(DB_VarExpSpecAmt       , 0.0));
-    z.Add(database_entity(DB_MedicalProportion   , 0.0));
-    z.Add(database_entity(DB_UwTestCost          , 0.0));
-    z.Add(database_entity(DB_VxBasicQTable       , 0.0));
-    z.Add(database_entity(DB_VxDeficQTable       , 0.0));
-    z.Add(database_entity(DB_VxTaxQTable         , 0.0));
-    z.Add(database_entity(DB_StatVxInt           , 0.0));
-    z.Add(database_entity(DB_TaxVxInt            , 0.0));
-    z.Add(database_entity(DB_StatVxQ             , 0.0));
-    z.Add(database_entity(DB_TaxVxQ              , 0.0));
-    z.Add(database_entity(DB_DeficVxQ            , 0.0));
-    z.Add(database_entity(DB_SnflQ               , 0.0));
-    z.Add(database_entity(DB_CalculateComp       , false));
-    z.Add(database_entity(DB_CompTarget          , 0.0));
-    z.Add(database_entity(DB_CompExcess          , 0.0));
-    z.Add(database_entity(DB_CompChargeback      , 0.0));
-    z.Add(database_entity(DB_LapseRate           , 0.0));
-    z.Add(database_entity(DB_ReqSurpNaar         , 0.0));
-    z.Add(database_entity(DB_ReqSurpVx           , 0.0));
-    z.Add(database_entity(DB_LicFitRate          , 0.0));
-    z.Add(database_entity(DB_LicDacTaxRate       , 0.0));
-    z.Add(database_entity(DB_GdbVxMethod         , 0.0));
-    z.Add(database_entity(DB_PrimaryHurdle       , 0.0));
-    z.Add(database_entity(DB_SecondaryHurdle     , 0.0));
-    z.Add(database_entity(DB_LedgerType          , mce_ill_reg));
-    z.Add(database_entity(DB_AllowExpRating      , false));
+    z.Add({DB_AdbTable            , 708});
+    z.Add({DB_AllowAdb            , true});
+    z.Add({DB_AdbMinIssAge        , 15});
+    z.Add({DB_AdbMaxIssAge        , 70});
+    z.Add({DB_AdbLimit            , 1000000.0});
+    z.Add({DB_AdbCoiRate          , 0.0});
+    z.Add({DB_AdbPremRate         , 0.0});
+    z.Add({DB_WeightClass         , 0.0});
+    z.Add({DB_WeightGender        , 0.0});
+    z.Add({DB_WeightSmoking       , 0.0});
+    z.Add({DB_WeightAge           , 0.0});
+    z.Add({DB_WeightSpecAmt       , 0.0});
+    z.Add({DB_WeightState         , 0.0});
+    z.Add({DB_FullExpPol          , 0.0});
+    z.Add({DB_FullExpPrem         , 0.0});
+    z.Add({DB_FullExpDumpin       , 0.0});
+    z.Add({DB_FullExpSpecAmt      , 0.0});
+    z.Add({DB_VarExpPol           , 0.0});
+    z.Add({DB_VarExpPrem          , 0.0});
+    z.Add({DB_VarExpDumpin        , 0.0});
+    z.Add({DB_VarExpSpecAmt       , 0.0});
+    z.Add({DB_MedicalProportion   , 0.0});
+    z.Add({DB_UwTestCost          , 0.0});
+    z.Add({DB_VxBasicQTable       , 0.0});
+    z.Add({DB_VxDeficQTable       , 0.0});
+    z.Add({DB_VxTaxQTable         , 0.0});
+    z.Add({DB_StatVxInt           , 0.0});
+    z.Add({DB_TaxVxInt            , 0.0});
+    z.Add({DB_StatVxQ             , 0.0});
+    z.Add({DB_TaxVxQ              , 0.0});
+    z.Add({DB_DeficVxQ            , 0.0});
+    z.Add({DB_SnflQ               , 0.0});
+    z.Add({DB_CalculateComp       , false});
+    z.Add({DB_CompTarget          , 0.0});
+    z.Add({DB_CompExcess          , 0.0});
+    z.Add({DB_CompChargeback      , 0.0});
+    z.Add({DB_LapseRate           , 0.0});
+    z.Add({DB_ReqSurpNaar         , 0.0});
+    z.Add({DB_ReqSurpVx           , 0.0});
+    z.Add({DB_LicFitRate          , 0.0});
+    z.Add({DB_LicDacTaxRate       , 0.0});
+    z.Add({DB_GdbVxMethod         , 0.0});
+    z.Add({DB_PrimaryHurdle       , 0.0});
+    z.Add({DB_SecondaryHurdle     , 0.0});
+    z.Add({DB_LedgerType          , mce_ill_reg});
+    z.Add({DB_AllowExpRating      , false});
 
     // 1960 CSG (which does not distinguish gender).
-    z.Add(database_entity(DB_GroupProxyRateTable , 305));
+    z.Add({DB_GroupProxyRateTable , 305});
 
     double T83Gam[3] = {825, 826, 826,};
     z.Add
-        (database_entity
-            (DB_PartialMortTable
-            ,e_number_of_axes
-            ,dims311
-            ,T83Gam
-            ,"1983 GAM, using male rates for unisex because no unisex table 
was published."
-            )
-        );
-
-    z.Add(database_entity(DB_AllowWd             , true));
-    z.Add(database_entity(DB_AllowLoan           , true));
-    z.Add(database_entity(DB_AllowChangeToDbo2   , true));
-    z.Add(database_entity(DB_AllowSpecAmtIncr    , true));
-    z.Add(database_entity(DB_NoLapseAlwaysActive , false));
-    z.Add(database_entity(DB_ExpRatStdDevMult    , 0.0));
-    z.Add(database_entity(DB_ExpRatIbnrMult      , 0.0));
-    z.Add(database_entity(DB_ExpRatCoiRetention  , 0.0));
-    z.Add(database_entity(DB_StableValFundCharge , 0.0));
-    z.Add(database_entity(DB_LoadAmortFundCharge , 0.0030));
-    z.Add(database_entity(DB_AllowAmortPremLoad  , false));
-    z.Add(database_entity(DB_PremTaxAmortPeriod  , 0));
-    z.Add(database_entity(DB_PremTaxAmortIntRate , 0.0));
+        ({DB_PartialMortTable
+         ,e_number_of_axes
+         ,dims311
+         ,T83Gam
+         ,"1983 GAM, using male rates for unisex because no unisex table was 
published."
+        });
+
+    z.Add({DB_AllowWd             , true});
+    z.Add({DB_AllowLoan           , true});
+    z.Add({DB_AllowChangeToDbo2   , true});
+    z.Add({DB_AllowSpecAmtIncr    , true});
+    z.Add({DB_NoLapseAlwaysActive , false});
+    z.Add({DB_ExpRatStdDevMult    , 0.0});
+    z.Add({DB_ExpRatIbnrMult      , 0.0});
+    z.Add({DB_ExpRatCoiRetention  , 0.0});
+    z.Add({DB_StableValFundCharge , 0.0});
+    z.Add({DB_LoadAmortFundCharge , 0.0030});
+    z.Add({DB_AllowAmortPremLoad  , false});
+    z.Add({DB_PremTaxAmortPeriod  , 0});
+    z.Add({DB_PremTaxAmortIntRate , 0.0});
     // Pass through premium tax.
-    z.Add
-        (database_entity
-            (DB_PremTaxLoad
-            ,premium_tax_dimensions
-            ,premium_tax_rates_for_life_insurance()
-            )
-        );
-    z.Add(database_entity(DB_AllowHoneymoon      , true));
+    z.Add({DB_PremTaxLoad, premium_tax_dimensions, 
premium_tax_rates_for_life_insurance()});
+    z.Add({DB_AllowHoneymoon      , true});
     // Set target equal to seven-pay premium.
-    z.Add(database_entity(DB_TgtPremTable        , 10));
-    z.Add(database_entity(DB_TgtPremMonthlyPolFee, 0.0));
-    z.Add(database_entity(DB_AllowExtraAssetComp , true));
-    z.Add(database_entity(DB_AllowExtraPremComp  , true));
-    z.Add(database_entity(DB_AssetChargeType     , oe_asset_charge_spread));
-    z.Add(database_entity(DB_AllowUltraPrefClass , false));
-    z.Add(database_entity(DB_AllowGenAcct        , true));
-    z.Add(database_entity(DB_AllowSepAcct        , true));
-    z.Add(database_entity(DB_AllowGenAcctEarnRate, true));
-    z.Add(database_entity(DB_AllowSepAcctNetRate , true));
-    z.Add(database_entity(DB_MaxGenAcctRate      , 0.06));
-    z.Add(database_entity(DB_MaxSepAcctRate      , 0.12));
-    z.Add(database_entity(DB_MinVlrRate          , 0.04));
-    z.Add(database_entity(DB_IntSpreadMode       , mce_spread_daily));
-    z.Add(database_entity(DB_StateApproved       , true));
-    z.Add(database_entity(DB_AllowStateXX        , true));
-    z.Add(database_entity(DB_AllowForeign        , true));
-    z.Add(database_entity(DB_GroupIndivSelection , false));
-    z.Add(database_entity(DB_AllowImfOverride    , false));
-    z.Add(database_entity(DB_AllowNo7702         , false));
-    z.Add(database_entity(DB_EnforceNaarLimit    , true));
-    z.Add(database_entity(DB_DynamicSepAcctLoad  , false));
-    z.Add(database_entity(DB_SpecAmtLoadLimit    , 10000000.0));
-    z.Add(database_entity(DB_RatingsAffect7702   , false));
-    z.Add(database_entity(DB_CvatMatChangeDefn   , 
mce_earlier_of_increase_or_unnecessary_premium));
-    z.Add(database_entity(DB_GptMatChangeDefn    , 0));
-    z.Add(database_entity(DB_Irc7702BftIsSpecAmt , 0));
-    z.Add(database_entity(DB_RiskyInitial7702Db  , false));
-    z.Add(database_entity(DB_Irc7702Endowment    , 0));
-    z.Add(database_entity(DB_Effective7702DboRop , 0));
-    z.Add(database_entity(DB_TermIsQABOrDb7702   , oe_7702_term_is_db));
-    z.Add(database_entity(DB_TermIsQABOrDb7702A  , oe_7702_term_is_db));
-    z.Add(database_entity(DB_GioIsQAB            , false));
-    z.Add(database_entity(DB_AdbIsQAB            , false));
-    z.Add(database_entity(DB_SpouseRiderIsQAB    , false));
-    z.Add(database_entity(DB_ChildRiderIsQAB     , false));
-    z.Add(database_entity(DB_WpIsQAB             , false));
-    z.Add(database_entity(DB_ExpRatRiskCoiMult   , 0));
-    z.Add(database_entity(DB_AllowSpouseRider    , true));
-    z.Add(database_entity(DB_AllowChildRider     , true));
-
-    z.Add(database_entity(DB_SpouseRiderMinAmt   , 10000));
-    z.Add(database_entity(DB_SpouseRiderMaxAmt   , 1000000));
-    z.Add(database_entity(DB_SpouseRiderMinIssAge, 20));
-    z.Add(database_entity(DB_SpouseRiderMaxIssAge, 65));
+    z.Add({DB_TgtPremTable        , 10});
+    z.Add({DB_TgtPremMonthlyPolFee, 0.0});
+    z.Add({DB_AllowExtraAssetComp , true});
+    z.Add({DB_AllowExtraPremComp  , true});
+    z.Add({DB_AssetChargeType     , oe_asset_charge_spread});
+    z.Add({DB_AllowUltraPrefClass , false});
+    z.Add({DB_AllowGenAcct        , true});
+    z.Add({DB_AllowSepAcct        , true});
+    z.Add({DB_AllowGenAcctEarnRate, true});
+    z.Add({DB_AllowSepAcctNetRate , true});
+    z.Add({DB_MaxGenAcctRate      , 0.06});
+    z.Add({DB_MaxSepAcctRate      , 0.12});
+    z.Add({DB_MinVlrRate          , 0.04});
+    z.Add({DB_IntSpreadMode       , mce_spread_daily});
+    z.Add({DB_StateApproved       , true});
+    z.Add({DB_AllowStateXX        , true});
+    z.Add({DB_AllowForeign        , true});
+    z.Add({DB_GroupIndivSelection , false});
+    z.Add({DB_AllowImfOverride    , false});
+    z.Add({DB_AllowNo7702         , false});
+    z.Add({DB_EnforceNaarLimit    , true});
+    z.Add({DB_DynamicSepAcctLoad  , false});
+    z.Add({DB_SpecAmtLoadLimit    , 10000000.0});
+    z.Add({DB_RatingsAffect7702   , false});
+    z.Add({DB_CvatMatChangeDefn   , 
mce_earlier_of_increase_or_unnecessary_premium});
+    z.Add({DB_GptMatChangeDefn    , 0});
+    z.Add({DB_Irc7702BftIsSpecAmt , 0});
+    z.Add({DB_RiskyInitial7702Db  , false});
+    z.Add({DB_Irc7702Endowment    , 0});
+    z.Add({DB_Effective7702DboRop , 0});
+    z.Add({DB_TermIsQABOrDb7702   , oe_7702_term_is_db});
+    z.Add({DB_TermIsQABOrDb7702A  , oe_7702_term_is_db});
+    z.Add({DB_GioIsQAB            , false});
+    z.Add({DB_AdbIsQAB            , false});
+    z.Add({DB_SpouseRiderIsQAB    , false});
+    z.Add({DB_ChildRiderIsQAB     , false});
+    z.Add({DB_WpIsQAB             , false});
+    z.Add({DB_ExpRatRiskCoiMult   , 0});
+    z.Add({DB_AllowSpouseRider    , true});
+    z.Add({DB_AllowChildRider     , true});
+
+    z.Add({DB_SpouseRiderMinAmt   , 10000});
+    z.Add({DB_SpouseRiderMaxAmt   , 1000000});
+    z.Add({DB_SpouseRiderMinIssAge, 20});
+    z.Add({DB_SpouseRiderMaxIssAge, 65});
 
     // Min and max deliberately identical for testing.
-    z.Add(database_entity(DB_ChildRiderMinAmt    , 25000));
-    z.Add(database_entity(DB_ChildRiderMaxAmt    , 25000));
+    z.Add({DB_ChildRiderMinAmt    , 25000});
+    z.Add({DB_ChildRiderMaxAmt    , 25000});
 
     // Spouse and child riders: arbitrarily use 1960 CSG.
-    z.Add(database_entity(DB_SpouseRiderGuarTable, 305));
-    z.Add(database_entity(DB_SpouseRiderTable    , 305));
-    z.Add(database_entity(DB_ChildRiderTable     , 305));
+    z.Add({DB_SpouseRiderGuarTable, 305});
+    z.Add({DB_SpouseRiderTable    , 305});
+    z.Add({DB_ChildRiderTable     , 305});
 
-    z.Add(database_entity(DB_GenAcctIntBonus     , 0.0));
+    z.Add({DB_GenAcctIntBonus     , 0.0});
 
     // Allow experience rating.
-    z.Add(database_entity(DB_AllowExpRating      , true));
-    z.Add(database_entity(DB_ExpRatIbnrMult      , 6.0));
-    z.Add(database_entity(DB_ExpRatAmortPeriod   , 4.0));
+    z.Add({DB_AllowExpRating      , true});
+    z.Add({DB_ExpRatIbnrMult      , 6.0});
+    z.Add({DB_ExpRatAmortPeriod   , 4.0});
 
     z.WriteDB(AddDataDir("sample.database"));
 
-    z.Add(database_entity(DB_LedgerType          , mce_finra));
+    z.Add({DB_LedgerType          , mce_finra});
     z.WriteDB(AddDataDir("sample2finra.database"));
 
-    z.Add(database_entity(DB_LedgerType          , 
mce_group_private_placement));
+    z.Add({DB_LedgerType          , mce_group_private_placement});
     z.WriteDB(AddDataDir("sample2gpp.database"));
 
-    z.Add(database_entity(DB_LedgerType          , 
mce_individual_private_placement));
+    z.Add({DB_LedgerType          , mce_individual_private_placement});
     z.WriteDB(AddDataDir("sample2ipp.database"));
 
     // Exotica.
-    z.Add(database_entity(DB_LedgerType          , mce_finra));
+    z.Add({DB_LedgerType          , mce_finra});
     // Certain group-quote columns are available only when these two
     // entities are 'true':
-    z.Add(database_entity(DB_SplitMinPrem        , true));
-    z.Add(database_entity(DB_TermIsNotRider      , true));
+    z.Add({DB_SplitMinPrem        , true});
+    z.Add({DB_TermIsNotRider      , true});
     // This fixed loan rate varies by duration.
     int dims_1111113[e_number_of_axes] = {1, 1, 1, 1, 1, 1, 3};
     double loanrate[3] = {0.06, 0.05, 0.04};
-    z.Add(database_entity(DB_FixedLoanRate, e_number_of_axes, dims_1111113, 
loanrate));
+    z.Add({DB_FixedLoanRate, e_number_of_axes, dims_1111113, loanrate});
     double cv_enh[3] = {0.10, 0.05, 0.00};
-    z.Add(database_entity(DB_CashValueEnhMult, e_number_of_axes, dims_1111113, 
cv_enh));
+    z.Add({DB_CashValueEnhMult, e_number_of_axes, dims_1111113, cv_enh});
     z.WriteDB(AddDataDir("sample2xyz.database"));
 }
 
@@ -1009,44 +983,44 @@ void DBDictionary::InitAntediluvian()
     // database entities.
     for(auto const& i : member_names())
         {
-        Add(database_entity(db_key_from_name(i), 0.0));
+        Add({db_key_from_name(i), 0.0});
         }
 
     // These are the same as class date_trammel's nominal limits.
     // They mustn't be zero.
-    Add(database_entity(DB_CoiResetMinDate       , 
gregorian_epoch().julian_day_number()));
-    Add(database_entity(DB_CoiResetMaxDate       , last_yyyy_date 
().julian_day_number()));
+    Add({DB_CoiResetMinDate       , calendar_date::gregorian_epoch_jdn});
+    Add({DB_CoiResetMaxDate       , calendar_date::last_yyyy_date_jdn });
 
-    Add(database_entity(DB_GuarInt               , 0.03));
+    Add({DB_GuarInt               , 0.03});
 
-    Add(database_entity(DB_FixedLoanRate         , 0.06));
+    Add({DB_FixedLoanRate         , 0.06});
 
-    Add(database_entity(DB_GuarRegLoanSpread     , 0.0));
-    Add(database_entity(DB_CurrRegLoanSpread     , 0.0));
-    Add(database_entity(DB_GuarPrefLoanSpread    , 0.0));
-    Add(database_entity(DB_CurrPrefLoanSpread    , 0.0));
+    Add({DB_GuarRegLoanSpread     , 0.0});
+    Add({DB_CurrRegLoanSpread     , 0.0});
+    Add({DB_GuarPrefLoanSpread    , 0.0});
+    Add({DB_CurrPrefLoanSpread    , 0.0});
 
-    Add(database_entity(DB_AllowPreferredClass   , true));
+    Add({DB_AllowPreferredClass   , true});
 
     // premium loads
 
-    Add(database_entity(DB_GuarMonthlyPolFee     , 12.00));
-    Add(database_entity(DB_GuarSpecAmtLoad       , 0.0));
-    Add(database_entity(DB_GuarPremLoadTgt       , 0.025));
-    Add(database_entity(DB_GuarPremLoadExc       , 0.025));
-    Add(database_entity(DB_CurrMonthlyPolFee     , 5.00));
-    Add(database_entity(DB_CurrSpecAmtLoad       , 0.0));
-    Add(database_entity(DB_CurrPremLoadTgt       , 0.025));
-    Add(database_entity(DB_CurrPremLoadExc       , 0.025));
+    Add({DB_GuarMonthlyPolFee     , 12.00});
+    Add({DB_GuarSpecAmtLoad       , 0.0});
+    Add({DB_GuarPremLoadTgt       , 0.025});
+    Add({DB_GuarPremLoadExc       , 0.025});
+    Add({DB_CurrMonthlyPolFee     , 5.00});
+    Add({DB_CurrSpecAmtLoad       , 0.0});
+    Add({DB_CurrPremLoadTgt       , 0.025});
+    Add({DB_CurrPremLoadExc       , 0.025});
 
-    Add(database_entity(DB_MinWd                 , 100.0));
-    Add(database_entity(DB_WdFee                 , 5.0));
-    Add(database_entity(DB_WdFeeRate             , 0.01));
+    Add({DB_MinWd                 , 100.0});
+    Add({DB_WdFee                 , 5.0});
+    Add({DB_WdFeeRate             , 0.01});
 
     int guar_coi_dims[e_number_of_axes] = {1, 1, 3, 1, 1, 1, 1};
     // smoker, nonsmoker, unismoke
     double guar_coi_tables[3] = {111, 109, 107};
-    Add(database_entity(DB_GuarCoiTable, e_number_of_axes, guar_coi_dims, 
guar_coi_tables));
+    Add({DB_GuarCoiTable, e_number_of_axes, guar_coi_dims, guar_coi_tables});
 
     int curr_coi_dims[e_number_of_axes] = {1, 4, 3, 1, 1, 1, 1};
     // preferred, standard, rated, ultrapreferred by smoker, nonsmoker, 
unismoke
@@ -1057,40 +1031,40 @@ void DBDictionary::InitAntediluvian()
         5, 6, 4, // rated sm ns us
         0, 0, 0, // ultra sm ns us
         };
-    Add(database_entity(DB_CurrCoiTable, e_number_of_axes, curr_coi_dims, 
curr_coi_tables));
-
-    Add(database_entity(DB_CorridorTable         , 7));
-    Add(database_entity(DB_WpTable               , 8));
-    Add(database_entity(DB_AdbTable              , 9));
-    Add(database_entity(DB_MaturityAge           , 100));
-    Add(database_entity(DB_AgeLastOrNearest      , 
oe_age_nearest_birthday_ties_older));
-    Add(database_entity(DB_MinSpecAmt            , 10000.0));
-
-    Add(database_entity(DB_AllowGenAcct          , true));
-    Add(database_entity(DB_MaxGenAcctRate        , 0.12));
-    Add(database_entity(DB_MaxSepAcctRate        , 0.12));
-
-    Add(database_entity(DB_AllowLoan             , true));
-    Add(database_entity(DB_AllowWd               , true));
-    Add(database_entity(DB_AllowFlatExtras       , true));
-    Add(database_entity(DB_AllowChangeToDbo2     , true));
-    Add(database_entity(DB_AllowDboRop           , true));
-
-    Add(database_entity(DB_LedgerType            , mce_ill_reg));
-
-    Add(database_entity(DB_NoLapseAlwaysActive   , 0.0));
-    Add(database_entity(DB_NoLapseMinDur         , 0.0));
-    Add(database_entity(DB_NoLapseMinAge         , 0.0));
-
-    Add(database_entity(DB_Has1035ExchCharge     , 0.0));
-    Add(database_entity(DB_SmokeOrTobacco        , 0.0));
-    Add(database_entity(DB_DacTaxFundCharge      , 0.0));
-    Add(database_entity(DB_AllowWp               , false));
-    Add(database_entity(DB_AllowAdb              , false));
-    Add(database_entity(DB_AllowSpouseRider      , false));
-    Add(database_entity(DB_AllowChildRider       , false));
-
-    Add(database_entity(DB_ExpRatAmortPeriod     , 4.0));
+    Add({DB_CurrCoiTable, e_number_of_axes, curr_coi_dims, curr_coi_tables});
+
+    Add({DB_CorridorTable         , 7});
+    Add({DB_WpTable               , 8});
+    Add({DB_AdbTable              , 9});
+    Add({DB_MaturityAge           , 100});
+    Add({DB_AgeLastOrNearest      , oe_age_nearest_birthday_ties_older});
+    Add({DB_MinSpecAmt            , 10000.0});
+
+    Add({DB_AllowGenAcct          , true});
+    Add({DB_MaxGenAcctRate        , 0.12});
+    Add({DB_MaxSepAcctRate        , 0.12});
+
+    Add({DB_AllowLoan             , true});
+    Add({DB_AllowWd               , true});
+    Add({DB_AllowFlatExtras       , true});
+    Add({DB_AllowChangeToDbo2     , true});
+    Add({DB_AllowDboRop           , true});
+
+    Add({DB_LedgerType            , mce_ill_reg});
+
+    Add({DB_NoLapseAlwaysActive   , 0.0});
+    Add({DB_NoLapseMinDur         , 0.0});
+    Add({DB_NoLapseMinAge         , 0.0});
+
+    Add({DB_Has1035ExchCharge     , 0.0});
+    Add({DB_SmokeOrTobacco        , 0.0});
+    Add({DB_DacTaxFundCharge      , 0.0});
+    Add({DB_AllowWp               , false});
+    Add({DB_AllowAdb              , false});
+    Add({DB_AllowSpouseRider      , false});
+    Add({DB_AllowChildRider       , false});
+
+    Add({DB_ExpRatAmortPeriod     , 4.0});
 }
 
 /// Print databases to file in an alternative text format.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]