[cfe-dev] (no subject)

Tiago Macarios via cfe-dev cfe-dev at lists.llvm.org
Mon Apr 17 20:31:36 PDT 2017


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<char>::iterator> match;
                                             ^

Mac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170417/30d59039/attachment.html>


More information about the cfe-dev mailing list