[I've edited this question as I simplified the example causing the issue]
I'm getting the following error on Travis CI (dist: trusty) with clang 3.9:
error: call to implicitly-deleted copy constructor of 'Foo'
: foo{move(_foo)},
^ [in a constructor member initialiser list]
note: copy constructor is implicitly deleted because 'Foo' has a user-declared move constructor
Foo(Foo&&) = default;
move(_foo)
is clearly an xvalue -- why is the copy constructor being called?
What's particularly odd is that compiling with clang 3.9 works on my local machine. I am setting -std=c++11. I'd be grateful for any suggestions.
I had the same issue with g++ 4.8, indicating it was a problem with the libraries. And indeed,
https://github.com/travis-ci/travis-ci/issues/6300#issue-165225842