regex_error with up-to-date Intel compiler
Trying to run the example compiled with the Intel 18 compiler
$ icpc --version
icpc (ICC) 18.0.2 20180210
Copyright (C) 1985-2018 Intel Corporation. All rights reserved.
with
$ icpc -I../include -std=c++11 example.cpp
fails with
$ ./a.out
terminate called after throwing an instance of 'std::regex_error'
what(): regex_error
Aborted (core dumped)
That's a bit unfortunate. Is it using an old GCC standard library or does Intel have one that claims to support regex?
It probably is using an old gcc standard library. This was on an RHEL 7 system, where IIRC G++ also gives the same error.
I'm hitting this same issue of
terminate called after throwing an instance of 'std::regex_error' what(): regex_error
using
g++-5 --version g++-5 (Ubuntu 5.5.0-12ubuntu1~14.04) 5.5.0 20171010
during the include of the cxxopts header. Please let me know if I can provide additional information. I'll report back if I find a solution.
Definitely shouldn't happen on g++-5.5.0. If you're able to get any more out of stdlib about the problem that would be great.
It would be difficult to reproduce with g++, because the Travis build uses a similar version. The Intel compiler error is even harder to reproduce because I don't have an Intel compiler, although it's probably not too hard to obtain.
If you know which version of the standard library you're running with that would be helpful. It might just be that it's out of date.
I am hitting the same issue using Intel compiler 19.0, libstdc++ 6.0.25, and cxxopts 2.2.0. Are there any updates on this one? Is the version of libstdc++ the cause of this behavior or could it be something else?
Intel compiler may not have it's own stdc++ implementation. I think the temporary workaround is to provide icpc a different version of libstdc++ which has full c++11 support, say gcc-5 or even newer. I did this by prepend the path of a local build of gcc to my environment. My icpc works fine now.