Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3983 closed Bugs (fixed)

catch reference to incomplete type in signals2

Reported by: sorokin@… Owned by: Frank Mori Hess
Milestone: Boost 1.43.0 Component: signals2
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

In boost/signals2/last_value.hpp reference to incomplete type boost::signals2::expired_slot is catched.

The following code don't compile with comeau and clang:

struct T;

template <typename U> void f() {

try {} catch(T const &) {}

}

struct T {};

int main() {

f<int>(); return 0;

}

With error message:

7.cpp:9:19: error: cannot catch reference to incomplete type 'struct T const'

catch(T const &)

Change History (4)

comment:1 by sorokin@…, 13 years ago

15.3 Handling an exception [except.handle] 1 The exception-declaration in a handler describes the type(s) of exceptions that can cause that handler to be entered. The exception-declaration shall not denote an incomplete type or an rvalue reference type. The exception-declaration shall not denote a pointer or reference to an incomplete type, other than void*, const void*, volatile void*, or const volatile void*.

comment:2 by Frank Mori Hess, 13 years ago

(In [60383]) Fixed standard violations where I caught incomplete types. Refs #3983.

comment:3 by sorokin@…, 13 years ago

Resolution: fixed
Status: newclosed

I've tried new version from thunk. Everything works correct. Thanks a lot!

As the bug is fixed I close this ticket.

comment:4 by Frank Mori Hess, 13 years ago

(In [60426]) Merged [60383] to release branch. Fixes #3983.

Note: See TracTickets for help on using tickets.