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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to