lmi
[Top][All Lists]
Advanced

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

[lmi] Default values for default arguments


From: Greg Chicares
Subject: [lmi] Default values for default arguments
Date: Sat, 4 Feb 2017 04:51:35 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0

Vadim--Do you see any reason why we should not prefer the uniform
"{}" syntax to specify default values for default arguments as in
the following examples? E.g., does any compiler you customarily
use not support this yet?

---------8<--------8<--------8<--------8<--------8<--------8<--------8<-------
diff --git a/input_sequence.hpp b/input_sequence.hpp
index b4dfe6c..dc77158 100644
--- a/input_sequence.hpp
+++ b/input_sequence.hpp
@@ -262,10 +262,9 @@ class LMI_SO InputSequence
         ,int                             a_retirement_age
         ,int                             a_inforce_duration
         ,int                             a_effective_year
-        ,std::vector<std::string> const& a_allowed_keywords
-            = std::vector<std::string>()
+        ,std::vector<std::string> const& a_allowed_keywords = {}
         ,bool                            a_keywords_only = false
-        ,std::string const&              a_default_keyword = ""
+        ,std::string const&              a_default_keyword = {}
         );
 
     InputSequence(std::vector<double> const&);
--------->8-------->8-------->8-------->8-------->8-------->8-------->8-------




reply via email to

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