Hi,
I am trying to build GSL https://github.com/Microsoft/GSL using clang 3.9/4.0 and on both versions I get the error below. It compiles fine on GCC.
Someone on StackOverflow says that GCC’s behavior is the correct one. http://stackoverflow.com/questions/29483120/program-with-noexcept-constructor-accepted-by-gcc-rejected-by-clang
Is this a bug? Or am I missing something?
In file included from /mnt/c/Users/Mac/GitHub/GSL/tests/span_tests.cpp:25:
In file included from /usr/bin/…/lib/gcc/x86_64-linux-gnu/5.4.1/…/…/…/…/include/c++/5.4.1/regex:61:
/usr/bin/…/lib/gcc/x86_64-linux-gnu/5.4.1/…/…/…/…/include/c++/5.4.1/bits/regex.h:1574:7: error: exception specification of
explicitly defaulted move constructor does not match the calculated one
match_results(match_results&& __rhs) noexcept = default;
^
/mnt/c/Users/Mac/GitHub/GSL/tests/span_tests.cpp:1530:46: note: in instantiation of template class
‘std::__cxx11::match_results<gsl::details::span_iterator<gsl::span<char, -1>, false>,
std::allocator<std::__cxx11::sub_match<gsl::details::span_iterator<gsl::span<char, -1>, false> > > >’ requested here
std::match_results<span::iterator> match;
^
Mac