On 9/11/2014 10:58 AM, Christopher Pisz wrote:
I read that we could use the following syntax in C++11 with standard
containers. This is not working for me in msvc 2012. Is it a
compiler specific problem, or did I misunderstand how to do this?
std::vector<std::string> test = {"foo","bar"};
I'd like to set up a static const at the top of my cpp to define a
collection of strings.
I put this in my software about 15 years ago. Our software
was originally written in smalltalk and had the concept of
tuples well embedded in it. Works well but the language
lawyers hate it with a passion:
// try to model a tuple somewhat but with rigorous type checking
vector <string> tupleString ()
{
vector <string> aVectorOfstrings (0);
return aVectorOfstrings;
}
vector <string> tupleString (string string1)
{
vector <string> aVectorOfstrings (1);
aVectorOfstrings [0] = string1;
return aVectorOfstrings;
}
vector <string> tupleString (string string1, string string2)
{