Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in configure.py, we always use 'g++' for testing the supported C++ dialects, but we might want to use a different C++ compiler by passing --compiler=${a_better_cxx}, so in that case, the default C++ dialect of 'gnu++1y' is used, it is a deprecated GNU extension based on C++14, which is not the best C++ dialect we can heve from the specified compiler. so, we should specifiy the c++-dialect in travis recipe explicitly. as we know what dialect the installed compiler supports, and more importantly, C++17 is needed for copy elision, as we requires the compiler to not copy the return value if it is a "pure" rvalue. for instance, in seastar/tests/fstream_test.cc, see the struct of "fstream_wrapper", as its member variable of "input_stream" does not have a copy constructor, this instructs the compiler to define "input_stream"'s copy contructor as deleted. but "make_fstream()" returns an instance of "fstream_wrapper" as its return value, without copy elision and the copy constructor of "fstream_wrapper", this source file will fail to compile. the same problem also pops up in some other places in seastar's source tree. so we practically *require* C++17 to compile seastar. Signed-off-by: Kefu Chai <[email protected]>
- Loading branch information