I understand that in earlier versions of C++ that you cannot initialize vectors in this fashion: std::vector<int> vec = { 1, 2, 3 };
It is also to my understanding that C++ 14 can handle this type of inititliazation.
I think where my problems lies is that I'm not requesting to use C++14 in the proper way inside of my CMAKE file. This is how I'm currently telling my CMAKE file to use C++14: set(cmake_CXX_FLAGS -std=c++14) I was wondering if this is the correct way to do it because I'm still getting an error when I try to initialize my vector with values.
The http://cpp.sh gives same error both with and without = in C++98 mode:
In function 'int main()':
3:41: error: in C++98 'bar' must be initialized by constructor, not by '{...}'
3:41: error: could not convert '{10, 20, 30, 40, 50}' from '<brace-enclosed initializer list>' to 'std::vector<int>'