CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
excDblThrow.cc File Reference
#include <iostream>

Go to the source code of this file.

Classes

struct  B
 
struct  D
 

Macros

#define single(obj)
 
#define double(obj)
 

Functions

void f (void g())
 
void test1 ()
 
void test2 ()
 
void test3 ()
 
void test4 ()
 
int main ()
 

Macro Definition Documentation

◆ double

#define double (   obj)
Value:
cerr << "\ndouble( " #obj " )\n"; \
try { throw obj; } \
catch ( const B & x ) { throw; }
Definition: excDblThrow.cc:8

Definition at line 32 of file excDblThrow.cc.

◆ single

#define single (   obj)
Value:
cerr << "\nsingle( " #obj " )\n"; \
const B & ref = obj; \
throw ref;

Definition at line 26 of file excDblThrow.cc.

Function Documentation

◆ f()

◆ main()

int main ( )

Definition at line 53 of file excDblThrow.cc.

53 {
54
55 cerr << "\nTesting double throws:\n";
56 f( test1 );
57 f( test2 );
58
59 cerr << "\nTesting single throws:\n";
60 f( test3 );
61 f( test4 );
62
63}
void test2()
Definition: excDblThrow.cc:48
void test1()
Definition: excDblThrow.cc:47
void test4()
Definition: excDblThrow.cc:50
void f(void g())
Definition: excDblThrow.cc:38
void test3()
Definition: excDblThrow.cc:49

◆ test1()

void test1 ( )

Definition at line 47 of file excDblThrow.cc.

47{ double( B() ); }
#define double(obj)
Definition: excDblThrow.cc:32

Referenced by main().

◆ test2()

void test2 ( )

Definition at line 48 of file excDblThrow.cc.

48{ double( D() ); }
Definition: excDblThrow.cc:17

Referenced by main().

◆ test3()

void test3 ( )

Definition at line 49 of file excDblThrow.cc.

49{ single( B() ); }
#define single(obj)
Definition: excDblThrow.cc:26

Referenced by main().

◆ test4()

void test4 ( )

Definition at line 50 of file excDblThrow.cc.

50{ single( D() ); }

Referenced by main().