Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
EXTERNAL_HEADERS
RSL
etc
config
src
PTR_EXCEPTION_SPEC.cpp
Go to the documentation of this file.
1
// checking for pointer exception specification
2
3
25
struct
S
26
{
27
void
foo
() throw () { }
28
void
bar
()
const
throw (
int
) { }
29
void
foobar
() throw (
int
,
double
) { }
30
};
31
32
void
foo
() throw (
char
,
long
)
33
{
34
// exception specification is not part of a function type (15.4, p12)
35
// but must be observed when assigning the adress of a function to
36
// a pointer to a function (15.4, p3)
37
void (*p_foo)()
throw
(
char
,
long
) = &
foo
;
38
39
void (
S
::*p_mfoo)()
throw
() = &S::foo;
40
void (
S
::*p_mbar)()
const
throw
(
int
) = &S::bar;
41
void (
S
::*p_mfoobar)()
throw
(
int
,
double
) = &S::foobar;
42
43
// prevent "unused" warnings
44
(void)&p_foo;
45
(void)&p_mfoo;
46
(void)&p_mbar;
47
(void)&p_mfoobar;
48
}
foo
void foo()
Definition
PTR_EXCEPTION_SPEC.cpp:32
S
Definition
COLLAPSE_TEMPLATE_STATICS.cpp:40
S::bar
void bar() const
Definition
PTR_EXCEPTION_SPEC.cpp:28
S::foo
void foo()
Definition
PTR_EXCEPTION_SPEC.cpp:27
S::foobar
void foobar()
Definition
PTR_EXCEPTION_SPEC.cpp:29
Generated by
1.9.8