[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-------
- [lmi] Default values for default arguments,
Greg Chicares <=
- Re: [lmi] Default values for default arguments, Vadim Zeitlin, 2017/02/04
- Re: [lmi] Default values for default arguments, Greg Chicares, 2017/02/04
- Re: [lmi] Default values for default arguments, Vadim Zeitlin, 2017/02/04
- [lmi] Third-millennium GOTW#1: is <int> special? [Was: Default values for default arguments], Greg Chicares, 2017/02/04
- Re: [lmi] Third-millennium GOTW#1: is <int> special?, Vadim Zeitlin, 2017/02/04
- Re: [lmi] Third-millennium GOTW#1: is <int> special?, Greg Chicares, 2017/02/05
- Re: [lmi] Third-millennium GOTW#1: is <int> special?, Vadim Zeitlin, 2017/02/06
- [lmi] More enabled warnings, less boost [Was: Third-millennium GOTW#1: is <int> special?], Greg Chicares, 2017/02/06
- Re: [lmi] More enabled warnings, less boost, Vadim Zeitlin, 2017/02/06
- Re: [lmi] More enabled warnings, less boost, Greg Chicares, 2017/02/06