I get an error that ‘literals’ is not a namespace-name when compiling the following
using namespace std::literals;
some more detail:
CentOS Linux release 7.2.1511 (Core)
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Intel compiler version
icpc (ICC) 16.0.3 20160415
Copyright (C) 1985-2016 Intel Corporation. All rights reserved.
gcc filename.cpp -std=c++1y
icpc filename.cpp -std=c++14
libstdc++ that comes with GCC 4.8.x does not have those literals; they started shipping beginning with GCC 4.9.0.