[llvm-bugs] [Bug 37559] New: noexcept specifiers are evaluated incorrectly

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 23 00:25:40 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37559

            Bug ID: 37559
           Summary: noexcept specifiers are evaluated incorrectly
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: lumosimann at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

There seem to be some problems about the point where noexcept specifiers are
evaluated. I.e., this code does not compile:

void some_function() noexcept;

class V1 {
  // does not compile
  void f() noexcept(noexcept(some_function()));
  decltype(&V1::f) f2;
};

class V2 {
  // does not compile
  void f() noexcept(true);
  decltype(&V2::f) f2;
};

class V3 {
  // compiles
  void f() noexcept;
  decltype(&V3::f) f2;
};

due to

<source>:5:17: error: exception specification is not available until end of
class definition

  decltype(&V1::f) f2;

                ^

<source>:11:17: error: exception specification is not available until end of
class definition

  decltype(&V2::f) f2;

                ^

2 errors generated.

Compiler returned: 1

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180523/0ccbfad9/attachment.html>


More information about the llvm-bugs mailing list