I am using travis.ci to do automated test builds of my git repositories.
For linux they use: Ubuntu 12.04
With clang 3.4
According to the clang page all C++ 14 language features are supported by Clang 3.4 (as long as you use the -std=c++1y flag).
So far so good:
I also need to use std::index_sequence<t0,...,tn>
which is library feature N3658 not a language feature. But I can not find any specific documentation on updating the C++ standard library for clang to make sure this feature is supported (it is not supported out of the box).
TestCode:
#include <utility>
int main() {
std::index_sequence<1,2,3,4> seq;
}
TestBuild:
> clang++ -std=c++1y pl.cpp
pl.cpp:3:10: error: no member named 'index_sequence' in namespace 'std'
std::index_sequence<1,2,3,4> seq;
~~~~~^
pl.cpp:3:37: error: use of undeclared identifier 'seq'
std::index_sequence<1,2,3,4> seq;
^
2 errors generated.
Update:
Based on the suggestion below I tried to use libc++.
Pretty sure I did something wrong but I have never tried to use an alternative standard library so am not sure what is going wrong here. Will digg in tonight. But if you have a suggestion then please leave a comment.
> sudo apt-get install -qq libc++1 libc6 libc++-dev
> clang++ -stdlib=libc++ pl.cpp
pl.cpp:1:10: fatal error: 'utility' file not found
#include <utility>
^
1 error generated.
Well the answer seems to be to install g++-4.9 This will update the standard libraries already installed to a point where clang will be able to compile the code.
So this is what I added to
travis.yml
fileAfter I consolidate my g++ and clang++ pre-build code: