#include <iostream>
#include <vector>
using namespace std;
int main()
{
if (__cplusplus == 201703L) std::cout << "C++17\n";
else if (__cplusplus == 201402L) std::cout << "C++14\n";
else if (__cplusplus == 201103L) std::cout << "C++11\n";
else if (__cplusplus == 199711L) std::cout << "C++98\n";
else std::cout << "pre-standard C++\n";
vector<int> a;
a.push_back(3);
vector<int> b = move(a);
}
As far as I know, "move semantics" is a part of c++11
Output(when compiled with clang++ command without any flags): C++98
Then how are the move semantics working??
I know that I can select the particular version of c++ I want to compile to with the -std=c++xx flag, but that's not what I want.
I want to know, what is the default version of c++ to which clang compiles to in macOS ?