C++11: N2672 Initializer lists

- Modified code to use the more compact and readable initializer lists.
This commit is contained in:
Paul Beckingham 2015-05-24 12:47:36 -04:00
parent 49f7612704
commit 7bbc794d3a
25 changed files with 136 additions and 231 deletions

View file

@ -634,9 +634,7 @@ int main (int argc, char** argv)
// bool getOneOf (const std::vector <std::string>&, std::string&);
t.diag ("Nibbler::getOneOf");
options.push_back ("one");
options.push_back ("two");
options.push_back ("three");
options = {"one", "two", "three"};
n = Nibbler ("onetwothreefour");
t.ok (n.getOneOf (options, s), "'onetwothreefour': getOneOf () -> true");
t.is (s, "one", "'onetwothreefour': getOneOf () -> one");