It is legal for multiple threads to hold exception_ptr references to the same exception object.
It is illegal for multiple threads to modify the same exception_ptr object concurrently.
-
While calling current_exception makes a copy of the current exception object, it is still possible for the two copies to share internal state. Therefore, in general it is not safe to call rethrow_exception to throw the same exception object concurrently into multiple threads.
+
While calling current_exception makes a copy of the current exception object, it is still possible for the two copies to share internal state. Therefore, in general it is not safe to call rethrow_exception concurrently to throw the same exception object into multiple threads.
Default constructor: initializes an empty boost::exception object.
-
Copy constructor: initializes a boost::exception object which shares with x all data added through operator<<, including data that is added at a future time.
+
Copy constructor: initializes a boost::exception object which shares ownership with x of all data added through operator<<, including data that is added at a future time.
It is legal for multiple threads to hold exception_ptr references to the same exception object.
It is illegal for multiple threads to modify the same exception_ptr object concurrently.
-
While calling current_exception makes a copy of the current exception object, it is still possible for the two copies to share internal state. Therefore, in general it is not safe to call rethrow_exception to throw the same exception object concurrently into multiple threads.
+
While calling current_exception makes a copy of the current exception object, it is still possible for the two copies to share internal state. Therefore, in general it is not safe to call rethrow_exception concurrently to throw the same exception object into multiple threads.
See Also:
diff --git a/doc/source/boost-exception.reno b/doc/source/boost-exception.reno
index 1a46fa8..bfbd584 100644
--- a/doc/source/boost-exception.reno
+++ b/doc/source/boost-exception.reno
@@ -48,6 +48,335 @@
reno_context
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 6
+
+ reno_context
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 7
+
+ reno_context
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 8
+
+ reno_context
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 9
+
+ reno_context
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 10
+
+ reno_context
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 11
+
+ reno_context
+
+
+
+
+
+ 0
+
+
+
+
+ 0
+
+ 12
+
+ reno_context
+
@@ -136,7 +465,105 @@
0
- 7
+ 14
+
+ reno_context
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 15
+
+ reno_context
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 16reno_context
@@ -185,431 +612,6 @@
(:include include:)
(:auto also:)
-
-
- 0
-
- 8
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 9
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 10
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 11
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
----
!!!See Also:
(:pagelist link="backlink" except_tags="exception,member" mod="w":)
-
-
-
-
- 0
-
- 12
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:pagelist link="backlink":)
-
-
-
-
- 0
-
- 13
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 14
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 15
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 16
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
- 0
@@ -618,545 +620,6 @@
reno_context
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 18
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 19
-
- reno_context
-
-
-
-
-
- 0
-
-
-
-
- 0
-
- 20
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 21
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 22
-
- reno_context
-
-
-
-
-
- 0
-
-
-
-
- 0
-
- 23
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 24
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 25
-
- reno_context
-
-
-
-
-
- 0
-
-
-
-
- 0
-
- 26
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 27
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 28
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 29
-
- reno_context
-
@@ -1251,56 +710,7 @@
0
- 31
-
- reno_context
-
-
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- 32
+ 19reno_context
@@ -1336,7 +746,32 @@
0
- -21
+ 20
+
+ reno_context
+
+
2
@@ -1345,7 +780,7 @@
0
- 33
+ 21reno_context
@@ -1390,7 +825,7 @@
0
- 34
+ 22reno_context
@@ -1424,7 +859,7 @@
0
- 35
+ 23reno_context
@@ -1465,7 +900,7 @@
0
- -21
+ -202
@@ -1474,7 +909,7 @@
0
- -16
+ -72
@@ -1483,7 +918,43 @@
0
- -11
+ 24
+
+ reno_context
+
+
2
@@ -1492,7 +963,43 @@
0
- -31
+ 25
+
+ reno_context
+
+
2
@@ -1501,7 +1008,43 @@
0
- -30
+ 26
+
+ reno_context
+
+
2
@@ -1510,7 +1053,7 @@
0
- -5
+ -122
@@ -1519,7 +1062,7 @@
0
- -29
+ -172
@@ -1528,7 +1071,43 @@
0
- -18
+ 27
+
+ reno_context
+
+
2
@@ -1537,7 +1116,7 @@
0
- -24
+ -142
@@ -1546,7 +1125,7 @@
0
- -13
+ -82
@@ -1555,7 +1134,52 @@
0
- -20
+ -9
+
+
+ 2
+ :)
###(:link
+ 1
+
+ 0
+
+ 28
+
+ reno_context
+
+
2
@@ -1573,88 +1197,7 @@
0
- 36
-
- reno_context
-
-
-
-
- 2
- :)
###(:link
- 1
-
- 0
-
- 37
-
- reno_context
-
-
+ -152
@@ -1663,7 +1206,7 @@
0
- -14
+ -52
@@ -1672,7 +1215,7 @@
0
- -33
+ -212
@@ -1681,7 +1224,39 @@
0
- -12
+ 29
+
+ reno_context
+
+
2
@@ -1690,7 +1265,7 @@
0
- -26
+ -62
@@ -1699,7 +1274,7 @@
0
- 38
+ 30reno_context
@@ -1740,7 +1315,7 @@
0
- 39
+ 31reno_context
@@ -1785,7 +1360,39 @@
0
- -17
+ 32
+
+ reno_context
+
+
2
@@ -1794,7 +1401,39 @@
0
- -23
+ 33
+
+ reno_context
+
+
2
@@ -1803,7 +1442,39 @@
0
- -15
+ 34
+
+ reno_context
+
+
2
@@ -1812,7 +1483,7 @@
0
- -8
+ -182
@@ -1821,7 +1492,39 @@
0
- -28
+ 35
+
+ reno_context
+
+
2
@@ -1830,7 +1533,39 @@
0
- -27
+ 36
+
+ reno_context
+
+
2
@@ -1839,7 +1574,7 @@
0
- 40
+ 37reno_context
@@ -1873,7 +1608,7 @@
0
- -26
+ -62
@@ -1882,7 +1617,7 @@
0
- -17
+ -322
@@ -1891,102 +1626,12 @@
0
- -15
+ -342 api pre_indent="4":)
(:include 1
-
- 0
-
- -8
-
-
- 2
- api pre_indent="4":)
(:include
- 1
-
- 0
-
- -38
-
-
- 2
- api pre_indent="4":)
(:include
- 1
-
- 0
-
- -28
-
-
- 2
- api pre_indent="4":)
}@]
`#include <(:link
- 1
-
- 0
-
- -27
-
-
- 2
- :)>
[@(:include
- 1
-
- 0
-
- -27
-
-
- 2
- api:)@]
!!Class exception
(:include
- 1
-
- 0
-
- -11
-
-
- 2
- :)
!!Transporting of Arbitrary Data to the Catch Site
(:include
- 1
-
- 0
-
- -31
-
-
- 2
- :)
(:include
- 1
-
- 0
-
- -30
-
-
- 2
- :)
(:include
- 1
-
- 0
-
- -5
-
-
- 2
- :)
(:include
- 1
-
- 0
-
- -29
-
-
- 2
- :)
(:include
- 10
@@ -1994,7 +1639,43 @@
2
- :)
!!Transporting of Exceptions between Threads
(:include
+ api pre_indent="4":)
(:include
+ 1
+
+ 0
+
+ -30
+
+
+ 2
+ api pre_indent="4":)
(:include
+ 1
+
+ 0
+
+ -35
+
+
+ 2
+ api pre_indent="4":)
}@]
`#include <(:link
+ 1
+
+ 0
+
+ -36
+
+
+ 2
+ :)>
[@(:include
+ 1
+
+ 0
+
+ -36
+
+
+ 2
+ api:)@]
!!Class exception
(:include 10
@@ -2003,12 +1684,12 @@
2
- :)
(:include
+ :)
!!Transporting of Arbitrary Data to the Catch Site
(:include 10
- -13
+ -252
@@ -2017,7 +1698,70 @@
0
- -20
+ -26
+
+
+ 2
+ :)
(:include
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ :)
(:include
+ 1
+
+ 0
+
+ -17
+
+
+ 2
+ :)
(:include
+ 1
+
+ 0
+
+ -27
+
+
+ 2
+ :)
!!Transporting of Exceptions between Threads
(:include
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :)
(:include
+ 1
+
+ 0
+
+ -8
+
+
+ 2
+ :)
(:include
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :)
(:include
+ 1
+
+ 0
+
+ -282
@@ -2035,16 +1779,7 @@
0
- -36
-
-
- 2
- :)
(:include
- 1
-
- 0
-
- -37
+ -152
@@ -2053,7 +1788,7 @@
0
- -14
+ -52
@@ -2062,13 +1797,170 @@
0
- -33
+ -212:)
!!Acknowledgements
Peter Dimov has been continuously influencing the design and evolution of Boost Exception. Also thanks to Tobias Schwinger, Tom Brinkman, Pavel Vozenilek and everyone who participated in the review process.
+
+
+ 0
+
+ -35
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 38
+
+ reno_context
+
+
+
+
+
+ 0
+
+
+
+
+ 0
+
+ 39
+
+ reno_context
+
+
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ -30
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ -25
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ -23
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ -37
+
+
+
+ 1
+ 2
+ (:auto !:)
(:pagelist fmt="index" except_tags="index,noindex" mod="w":)
+
+ 0
@@ -2086,7 +1978,7 @@
0
- -38
+ -27
@@ -2099,7 +1991,180 @@
0
- -35
+ -29
+
+
+
+ 1
+ 2
+ (:include include:)
(:pagelist link="backlink":)
+
+
+
+
+ 0
+
+ -28
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ -34
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ -33
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ -32
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ -31
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ -24
+
+
+
+ 1
+ 2
+ (:include include:)
----
!!!See Also:
(:pagelist link="backlink" except_tags="exception,member" mod="w":)
+
+
+
+
+ 0
+
+ -21
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ -20
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ 40
+
+ reno_context
+
+
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -22
+
+
+
+ 1
+ 2
+ (:include include:)
(:auto also:)
+
+
+
+
+ 0
+
+ -26
@@ -2122,27 +2187,27 @@
1
- F4C951B28F7DE500973AA3DFAA99F2BADA6EDAFA2B406C30BEF3B7FBE6FD57D7
- 2263754923
- 982
- 306
+ 187BFD2B78A0DD006717B5B06FFD465E2468F521C32A86FB793F7A68AB5417F3
+ 4276724153
+ 574
+ 3820
- ../../example/error_info_2.cpp
+ ../../example/error_info_1.cpp00
- adding of arbitrary data to active exception objects
+ adding of arbitrary data at the point of the throw
- adding_data_later
+ adding_data_at_throw
@@ -2151,71 +2216,6 @@
0
-
-
- 0
-
- -34
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- -40
-
-
-
- 1
- 2
- (:auto !:)
(:pagelist fmt="index" except_tags="index,noindex" mod="w":)
-
-
-
-
- 0
-
- -37
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- -39
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
-
-
- 0
-
- -33
-
-
-
- 1
- 2
- (:include include:)
(:auto also:)
-
-
@@ -2304,36 +2304,7 @@
- 7
- 2
- [@class
(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :)
{
protected:
(:include
- 1
-
- 0
-
- -7
-
-
- 2
- decl pre_indent="4":)
(:include
- 1
-
- 0
-
- -9
-
-
- 2
- decl pre_indent="4":)
};@]
+ 0
@@ -2428,161 +2399,7 @@
0
- -20
-
-
-
- 0
-
-
-
-
- 0
-
- -21
-
-
-
- 0
-
-
-
-
- 0
-
- -22
-
-
-
- 0
-
-
-
-
- 0
-
- -23
-
-
-
- 0
-
-
-
-
- 0
-
- -24
-
-
-
- 0
-
-
-
-
- 0
-
- -25
-
-
-
- 0
-
-
-
-
- 0
-
- -26
-
-
-
- 0
-
-
-
-
- 0
-
- -27
-
-
-
- 0
-
-
-
-
- 0
-
- -28
-
-
-
- 0
-
-
-
-
- 0
-
- -29
-
-
-
- 0
-
-
-
-
- 0
-
- -30
-
-
-
- 0
-
-
-
-
- 0
-
- -31
-
-
-
- 3
- 2
- [@template <class Tag,class T>
class
(:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)
{
public:
typedef T value_type;
error_info( value_type const & );
};@]
-
-
-
-
- 0
-
- -32
-
-
-
- 0
-
-
-
-
- 0
-
- -36
+ -35
@@ -2604,7 +2421,7 @@
0
- -35
+ -39
@@ -2615,7 +2432,7 @@
0
- -41
+ -30
@@ -2626,18 +2443,29 @@
0
- -34
+ -25
- 0
+ 3
+ 2
+ [@template <class Tag,class T>
class
(:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)
{
public:
typedef T value_type;
error_info( value_type const & );
};@]
0
- -40
+ -23
@@ -2659,7 +2487,51 @@
0
- -39
+ -36
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -27
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -29
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -28
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -34
@@ -2677,6 +2549,134 @@
0
+
+
+ 0
+
+ -32
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -31
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -24
+
+
+
+ 7
+ 2
+ [@class
(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :)
{
protected:
(:include
+ 1
+
+ 0
+
+ -16
+
+
+ 2
+ decl pre_indent="4":)
(:include
+ 1
+
+ 0
+
+ -39
+
+
+ 2
+ decl pre_indent="4":)
};@]
+
+
+
+
+ 0
+
+ -21
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -20
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -40
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -22
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -26
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -41
+
+
+
+ 0
+
+
@@ -2710,7 +2710,72 @@
- 0
+ 15
+ 2
+ [@#include <(:link
+ 1
+
+ 0
+
+ -30
+
+
+ 2
+ :)>
#include <(:link
+ 1
+
+ 0
+
+ -31
+
+
+ 2
+ :)>
#include <(:link
+ 1
+
+ 0
+
+ -32
+
+
+ 2
+ :)>
#include <(:link
+ 1
+
+ 0
+
+ -33
+
+
+ 2
+ :)>
#include <(:link
+ 1
+
+ 0
+
+ -34
+
+
+ 2
+ :)>
#include <(:link
+ 1
+
+ 0
+
+ -18
+
+
+ 2
+ :)>
#include <(:link
+ 1
+
+ 0
+
+ -35
+
+
+ 2
+ :)>@]
@@ -2732,18 +2797,7 @@
- 3
- 2
- [@(:include
- 1
-
- 0
-
- -5
-
-
- 2
- decl:)@]
+ 0
@@ -2820,27 +2874,7 @@
- 5
- 2
- [@(:include
- 1
-
- 0
-
- -31
-
-
- 2
- def:)
(:include
- 1
-
- 0
-
- -30
-
-
- 2
- decl:)@]
+ 0
@@ -2862,72 +2896,7 @@
- 15
- 2
- [@(:include
- 1
-
- 0
-
- -11
-
-
- 2
- def:)
(:include
- 1
-
- 0
-
- -31
-
-
- 2
- decl:)
typedef (:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<struct tag_throw_function,char const *> throw_function;
typedef (:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<struct tag_throw_file,char const *> throw_file;
typedef (:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<struct tag_throw_line,int> throw_line;
(:include
- 1
-
- 0
-
- -18
-
-
- 2
- decl:)
(:include
- 1
-
- 0
-
- -13
-
-
- 2
- decl:)@]
+ 0
@@ -2938,7 +2907,18 @@
- 0
+ 3
+ 2
+ [@(:include
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ decl:)@]
@@ -2956,51 +2936,54 @@
0
- -20
+ -35
- 0
-
-
-
-
- 0
-
- -21
-
-
-
- 0
-
-
-
-
- 0
-
- -22
-
-
-
- 0
-
-
-
-
- 0
-
- -23
-
-
-
- 3
+ 112[@(:include 10
- -29
+ -15
+
+
+ 2
+ decl:)
(:include
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ decl:)
(:include
+ 1
+
+ 0
+
+ -28
+
+
+ 2
+ decl:)
(:include
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ decl:)
(:include
+ 1
+
+ 0
+
+ -102
@@ -3011,13 +2994,55 @@
0
- -24
+ -380
+
+
+ 0
+
+ -39
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -30
+
+
+
+ 5
+ 2
+ [@(:include
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ decl:)
(:include
+ 1
+
+ 0
+
+ -5
+
+
+ 2
+ decl:)@]
+
+ 0
@@ -3033,291 +3058,7 @@
0
- -26
-
-
-
- 15
- 2
- [@#include <(:link
- 1
-
- 0
-
- -38
-
-
- 2
- :)>
#include <(:link
- 1
-
- 0
-
- -39
-
-
- 2
- :)>
#include <(:link
- 1
-
- 0
-
- -17
-
-
- 2
- :)>
#include <(:link
- 1
-
- 0
-
- -23
-
-
- 2
- :)>
#include <(:link
- 1
-
- 0
-
- -15
-
-
- 2
- :)>
#include <(:link
- 1
-
- 0
-
- -8
-
-
- 2
- :)>
#include <(:link
- 1
-
- 0
-
- -28
-
-
- 2
- :)>@]
-
-
-
-
- 0
-
- -27
-
-
-
- 5
- 2
- [@(:include
- 1
-
- 0
-
- -12
-
-
- 2
- decl:)
namespace
boost
{
(:include
- 1
-
- 0
-
- -33
-
-
- 2
- decl:)
}@]
-
-
-
-
- 0
-
- -28
-
-
-
- 11
- 2
- [@(:include
- 1
-
- 0
-
- -37
-
-
- 2
- decl:)
(:include
- 1
-
- 0
-
- -24
-
-
- 2
- decl:)
(:include
- 1
-
- 0
-
- -10
-
-
- 2
- decl:)
(:include
- 1
-
- 0
-
- -20
-
-
- 2
- decl:)
(:include
- 1
-
- 0
-
- -36
-
-
- 2
- decl:)@]
-
-
-
-
- 0
-
- -29
-
-
-
- 0
-
-
-
-
- 0
-
- -30
-
-
-
- 0
-
-
-
-
- 0
-
- -31
-
-
-
- 0
-
-
-
-
- 0
-
- -32
-
-
-
- 0
-
-
-
-
- 0
-
- -36
-
-
-
- 0
-
-
-
-
- 0
-
- -38
-
-
-
- 5
- 2
- [@(:include
- 1
-
- 0
-
- -11
-
-
- 2
- decl:)
(:include
- 1
-
- 0
-
- -14
-
-
- 2
- decl:)@]
-
-
-
-
- 0
-
- -35
-
-
-
- 0
-
-
-
-
- 0
-
- -41
-
-
-
- 0
-
-
-
-
- 0
-
- -34
-
-
-
- 0
-
-
-
-
- 0
-
- -40
+ -23
@@ -3339,18 +3080,91 @@
0
- -39
+ -36
- 3
+ 52[@(:include 10
- -31
+ -29
+
+
+ 2
+ decl:)
namespace
boost
{
(:include
+ 1
+
+ 0
+
+ -21
+
+
+ 2
+ decl:)
}@]
+
+
+
+
+ 0
+
+ -27
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -29
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -28
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -34
+
+
+
+ 5
+ 2
+ [@(:include
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ def:)
(:include
+ 1
+
+ 0
+
+ -262
@@ -3364,6 +3178,192 @@
-33
+
+ 3
+ 2
+ [@(:include
+ 1
+
+ 0
+
+ -17
+
+
+ 2
+ decl:)@]
+
+
+
+
+ 0
+
+ -32
+
+
+
+ 15
+ 2
+ [@(:include
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ def:)
(:include
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ decl:)
typedef (:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)<struct tag_throw_function,char const *> throw_function;
typedef (:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)<struct tag_throw_file,char const *> throw_file;
typedef (:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)<struct tag_throw_line,int> throw_line;
(:include
+ 1
+
+ 0
+
+ -27
+
+
+ 2
+ decl:)
(:include
+ 1
+
+ 0
+
+ -8
+
+
+ 2
+ decl:)@]
+
+
+
+
+ 0
+
+ -31
+
+
+
+ 3
+ 2
+ [@(:include
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ decl:)@]
+
+
+
+
+ 0
+
+ -24
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -21
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -20
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -40
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -22
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -26
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -41
+
+ 0
@@ -3390,9 +3390,9 @@
- 7
+ 52
- [@template <class E, class Tag1, class T1, ..., class TagN, class TN>
E const & (:link
+ [@std::string (:link 10
@@ -3401,25 +3401,16 @@
2
- |operator<<:)( E const & x,
(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)<
(:link
+ :)( boost::10
- -31
+ -242
- :)<Tag1,T1>,
...,
(:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<TagN,TN> > const & v );@]
+ const & x );@]
@@ -3441,36 +3432,7 @@
- 7
- 2
- [@(:link
- 1
-
- 0
-
- -7
-
-
- 2
- mod="m":)();
(:link
- 1
-
- 0
-
- -7
-
-
- 2
- mod="m":)( (:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) const & x );@]
+ 0
@@ -3481,7 +3443,18 @@
- 0
+ 3
+ 2
+ [@template <class T>
---unspecified--- (:link
+ 1
+
+ 0
+
+ -8
+
+
+ 2
+ :)( T const & e );@]
@@ -3492,10 +3465,19 @@
- 3
+ 52[@(:link 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) (:link
+ 10
@@ -3503,7 +3485,7 @@
2
- mod="m":)();@]
+ :)();@]
@@ -3516,16 +3498,7 @@
52
- [@template <class T>
(:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) (:link
+ [@void (:link 10
@@ -3534,485 +3507,12 @@
2
- :)( T const & e );@]
-
-
-
-
- 0
-
- -11
-
-
-
- 3
- 2
- [@class (:link
- 1
-
- 0
-
- -11
-
-
- 2
- :);@]
-
-
-
-
- 0
-
- -12
-
-
-
- 19
- 2
- [@#if !defined( BOOST_NO_EXCEPTIONS ) && !defined( BOOST_EXCEPTION_DISABLE )
#include <
- 1
-
- 0
-
- -17
-
-
- 2
- >
#include <boost/current_function.hpp>
#define
- 1
-
- 0
-
- -12
-
-
- 2
- (x)\
::boost::
- 1
-
- 0
-
- -33
-
-
- 2
- ( ::boost::
- 1
-
- 0
-
- -18
-
-
- 2
- (x) <<\
::boost::(:link
- 1
-
- 0
-
- -17
-
-
- 2
- |throw_function:)(BOOST_CURRENT_FUNCTION) <<\
::boost::(:link
- 1
-
- 0
-
- -17
-
-
- 2
- |throw_file:)(__FILE__) <<\
::boost::(:link
- 1
-
- 0
-
- -17
-
-
- 2
- |throw_line:)((int)__LINE__) )
#else
#define
- 1
-
- 0
-
- -12
-
-
- 2
- (x) ::boost::
- 1
-
- 0
-
- -33
-
-
- 2
- (x)
#endif@]
-
-
-
-
- 0
-
- -13
-
-
-
- 3
- 2
- [@template <class T>
---unspecified--- (:link
- 1
-
- 0
-
- -13
-
-
- 2
- :)( T const & e );@]
-
-
-
-
- 0
-
- -14
-
-
-
- 5
- 2
- [@std::string (:link
- 1
-
- 0
-
- -14
-
-
- 2
- :)( boost::
- 1
-
- 0
-
- -11
-
-
- 2
- const & x );@]
-
-
-
-
- 0
-
- -15
-
-
-
- 0
-
-
-
-
- 0
-
- -16
-
-
-
- 0
-
-
-
-
- 0
-
- -17
-
-
-
- 0
-
-
-
-
- 0
-
- -18
-
-
-
- 3
- 2
- [@template <class T>
---unspecified--- (:link
- 1
-
- 0
-
- -18
-
-
- 2
- :)( T const & x );@]
-
-
-
-
- 0
-
- -19
-
-
-
- 0
-
-
-
-
- 0
-
- -20
-
-
-
- 5
- 2
- [@(:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) (:link
- 1
-
- 0
-
- -20
-
-
- 2
- :)();@]
-
-
-
-
- 0
-
- -21
-
-
-
- 0
-
-
-
-
- 0
-
- -22
-
-
-
- 0
-
-
-
-
- 0
-
- -23
-
-
-
- 0
-
-
-
-
- 0
-
- -24
-
-
-
- 3
- 2
- [@typedef ---unspecified--- (:link
- 1
-
- 0
-
- -24
-
-
- 2
- :);@]
-
-
-
-
- 0
-
- -25
-
-
-
- 0
-
-
-
-
- 0
-
- -26
-
-
-
- 0
-
-
-
-
- 0
-
- -27
-
-
-
- 0
-
-
-
-
- 0
-
- -28
-
-
-
- 0
-
-
-
-
- 0
-
- -29
-
-
-
- 3
- 2
- [@template <class ErrorInfo,class E>
(:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:)<typename ErrorInfo::value_type const> (:link
- 1
-
- 0
-
- -29
-
-
- 2
- :)( E const & x );@]
-
-
-
-
- 0
-
- -30
-
-
-
- 5
- 2
- [@template <class E, class Tag, class T>
E const & (:link
- 1
-
- 0
-
- -30
-
-
- 2
- |operator<<:)( E const & x, (:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<Tag,T> const & v );@]
-
-
-
-
- 0
-
- -31
-
-
-
- 3
- 2
- [@template <class Tag,class T>
class (:link
- 1
-
- 0
-
- -31
-
-
- 2
- :);@]
-
-
-
-
- 0
-
- -32
-
-
-
- 0
-
-
-
-
- 0
-
- -36
-
-
-
- 5
- 2
- [@void (:link
- 1
-
- 0
-
- -36
-
-
- 2:)( (:link 10
- -24
+ -142
@@ -4023,7 +3523,195 @@
0
- -38
+ -11
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -12
+
+
+
+ 7
+ 2
+ [@template <class E, class Tag1, class T1, ..., class TagN, class TN>
E const & (:link
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ |operator<<:)( E const & x,
(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:)<
(:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)<Tag1,T1>,
...,
(:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)<TagN,TN> > const & v );@]
+
+
+
+
+ 0
+
+ -13
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -14
+
+
+
+ 3
+ 2
+ [@typedef ---unspecified--- (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :);@]
+
+
+
+
+ 0
+
+ -15
+
+
+
+ 5
+ 2
+ [@class
(:link
+ 1
+
+ 0
+
+ -15
+
+
+ 2
+ :):
public std::exception
public boost::
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+
{
---unspecified---
};@]
+
+
+
+
+ 0
+
+ -16
+
+
+
+ 7
+ 2
+ [@(:link
+ 1
+
+ 0
+
+ -16
+
+
+ 2
+ mod="m":)();
(:link
+ 1
+
+ 0
+
+ -16
+
+
+ 2
+ mod="m":)( (:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) const & x );@]
+
+
+
+
+ 0
+
+ -17
+
+
+
+ 3
+ 2
+ [@template <class ErrorInfo,class E>
(:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:)<typename ErrorInfo::value_type const> (:link
+ 1
+
+ 0
+
+ -17
+
+
+ 2
+ :)( E const & x );@]
+
+
+
+
+ 0
+
+ -18
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -19
@@ -4045,13 +3733,248 @@
0
- -41
+ -380
+
+
+ 0
+
+ -39
+
+
+
+ 3
+ 2
+ [@(:link
+ 1
+
+ 0
+
+ -39
+
+
+ 2
+ mod="m":)();@]
+
+
+
+
+ 0
+
+ -30
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -25
+
+
+
+ 3
+ 2
+ [@template <class Tag,class T>
class (:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :);@]
+
+
+
+
+ 0
+
+ -23
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -37
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -36
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -27
+
+
+
+ 3
+ 2
+ [@template <class T>
---unspecified--- (:link
+ 1
+
+ 0
+
+ -27
+
+
+ 2
+ :)( T const & x );@]
+
+
+
+
+ 0
+
+ -29
+
+
+
+ 19
+ 2
+ [@#if !defined( BOOST_NO_EXCEPTIONS ) && !defined( BOOST_EXCEPTION_DISABLE )
#include <
+ 1
+
+ 0
+
+ -32
+
+
+ 2
+ >
#include <boost/current_function.hpp>
#define
+ 1
+
+ 0
+
+ -29
+
+
+ 2
+ (x)\
::boost::
+ 1
+
+ 0
+
+ -21
+
+
+ 2
+ ( ::boost::
+ 1
+
+ 0
+
+ -27
+
+
+ 2
+ (x) <<\
::boost::(:link
+ 1
+
+ 0
+
+ -32
+
+
+ 2
+ |throw_function:)(BOOST_CURRENT_FUNCTION) <<\
::boost::(:link
+ 1
+
+ 0
+
+ -32
+
+
+ 2
+ |throw_file:)(__FILE__) <<\
::boost::(:link
+ 1
+
+ 0
+
+ -32
+
+
+ 2
+ |throw_line:)((int)__LINE__) )
#else
#define
+ 1
+
+ 0
+
+ -29
+
+
+ 2
+ (x) ::boost::
+ 1
+
+ 0
+
+ -21
+
+
+ 2
+ (x)
#endif@]
+
+
+
+
+ 0
+
+ -28
+
+
+
+ 5
+ 2
+ [@template <class T>
(:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) (:link
+ 1
+
+ 0
+
+ -28
+
+
+ 2
+ :)( T const & e );@]
+
+ 0
@@ -4063,6 +3986,103 @@
0
+
+
+ 0
+
+ -33
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -32
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -31
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -24
+
+
+
+ 3
+ 2
+ [@class (:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :);@]
+
+
+
+
+ 0
+
+ -21
+
+
+
+ 5
+ 2
+ [@#ifdef BOOST_NO_EXCEPTIONS
void (:link
+ 1
+
+ 0
+
+ -21
+
+
+ 2
+ :)( std::exception const & e ); // user defined
#else
template <class E>
void (:link
+ 1
+
+ 0
+
+ -21
+
+
+ 2
+ :)( E const & e );
#endif@]
+
+
+
+
+ 0
+
+ -20
+
+
+
+ 0
+
+ 0
@@ -4078,38 +4098,7 @@
0
- -37
-
-
-
- 5
- 2
- [@class
(:link
- 1
-
- 0
-
- -37
-
-
- 2
- :):
public std::exception
public boost::
- 1
-
- 0
-
- -11
-
-
- 2
-
{
---unspecified---
};@]
-
-
-
-
- 0
-
- -39
+ -22
@@ -4120,31 +4109,42 @@
0
- -33
+ -2652
- [@#ifdef BOOST_NO_EXCEPTIONS
void (:link
+ [@template <class E, class Tag, class T>
E const & (:link 10
- -33
+ -262
- :)( std::exception const & e ); // user defined
#else
template <class E>
void (:link
+ |operator<<:)( E const & x, (:link 10
- -33
+ -252
- :)( E const & e );
#endif@]
+ :)<Tag,T> const & v );@]
+
+
+
+
+ 0
+
+ -41
+
+
+
+ 0
@@ -4169,40 +4169,18 @@
- 5
+ 72
- (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
E must be boost::(:link
+ (:auto !!!:)
(:include synopsis:)
!!!!Returns:
This function iterates over all data objects stored in the boost::(:link 10
- -11
+ -242
- :), or a type that derives (indirectly) from boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :).
!!!!Effects:
Equivalent to x << v.(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements|get:)<0>() << ... << v.(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements|get:)<N>().
!!!!Returns:
x.
(:include throws:)
-
-
-
-
- 0
-
- -6
-
-
-
- 17
- 2
- (:auto !!!:)
The following example demonstrates how errno can be stored in exception objects using Boost Exception:
[@#include <(:link
+ :) through (:link 10
@@ -4211,117 +4189,23 @@
2
- :)>
#include <errno.h>
#include <iostream>
typedef boost::(:link
+ |operator<<:). The returned string is constructed by converting each data object to string and then concatenating these strings together.
When the (:link 10
- -31
+ -252
- :)<struct tag_errno,int> errno_info; //(1)
class my_error: public boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :), public std::exception { }; //(2)
void
f()
{
throw my_error() << errno_info(errno); //(3)
}
@]
First, we instantiate the (:link
- 1
-
- 0
-
- -31
-
-
- 2
- :) template using a unique identifier -- tag_errno, and the type of the info it identifies -- int. This provides compile-time type safety for the various values stored in exception objects.
Second, we define class my_error, which derives from boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :).
Finally, (3) illustrates how the typedef from (1) can be used with (:link
- 1
-
- 0
-
- -30
-
-
- 2
- |operator<<:) to store values in exception objects at the point of the throw.
The stored errno value can be recovered at a later time like this:
[@// ...continued
void
g()
{
try
{
f();
}
catch(
my_error & x )
{
if( boost::shared_ptr<int const> err=boost::(:link
- 1
-
- 0
-
- -29
-
-
- 2
- :)<errno_info>(x) )
std::cerr << "Error code: " << *err;
}
}@]
The (:link
- 1
-
- 0
-
- -29
-
-
- 2
- :) function template is instantiated with the typedef from (1), and is passed an exception object of a polymorphic type. If the exception object contains the requested value, the returned (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:) will point to it; otherwise an empty (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:) is returned.
+ :)<Tag,T> template is instantiated, the system attempts overload resolution for an unqualified call to to_string(x), where x is of type T. If this is successful, the to_string overload is expected to return std::string and is used to convert objects of type T to string.
Otherwise, the system attempts overload resolution for s << x, where s is a std::ostringstream and x is of type T. If this is successful, the operator<< overload is used to convert objects of type T to string.
Otherwise the system is unable to convert objects of type T to string, and an unspecified stub string value is used without issuing a compile error.
!!!!Notes:
*The format of the returned string is unspecified.
*The returned string is ''not'' user-friendly.
*If dynamic_cast<std::exception const *>(&x) is not null, the returned string includes the output from std::exception::what.
*The returned string may include additional platform-specific diagnostic information.
0
- -7
-
-
-
- 7
- 2
- (:auto !!!:)
(:include decl:)
!!!!Effects:
* Default constructor: initializes an empty boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) object.
* Copy constructor: initializes a boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) object which shares with x all data added through (:link
- 1
-
- 0
-
- -30
-
-
- 2
- |operator<<:), including data that is added at a future time.
!!!!Throws:
Nothing.
-
-
-
-
- 0
-
- -8
+ -6
@@ -4334,22 +4218,327 @@
0
- -9
+ -7
- 3
+ 172
- (:auto !!!:)
(:include decl:)
!!!!Effects:
Frees all resources associated with a boost::(:link
+ (:auto !!:)
Boost Exception provides a namespace-scope function (:link 10
- -11
+ -52
- :) object.
!!!!Throws:
Nothing.
+ :) which takes a boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :). The returned string contains:
*the string representation of all data objects added to the boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) through (:link
+ 1
+
+ 0
+
+ -26
+
+
+ 2
+ |operator<<:);
*the output from std::exception::what;
*additional platform-specific diagnostic information.
The returned string is not presentable as a friendly user message, but because it is generated automatically, it is useful for debugging or logging purposes. Here is an example:
[@#include <(:link
+ 1
+
+ 0
+
+ -6
+
+
+ 2
+ :)>
#include <iostream>
void f(); //throws unknown types that derive from boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :).
void
g()
{
try
{
f();
}
catch(
boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) & e )
{
std::cerr << (:link
+ 1
+
+ 0
+
+ -5
+
+
+ 2
+ :)(e);
}
}@]
+
+
+
+
+ 0
+
+ -8
+
+
+
+ 21
+ 2
+ (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
T must be a class with an accessible no-throw copy constructor.
!!!!Returns:
An object of ''unspecified'' type which derives publicly from T. That is, the returned object can be intercepted by a catch(T &).
!!!!Description:
This function is designed to be used directly in a throw-expression to enable the (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) support in Boost Exception. For example:
[@class
my_exception:
public std::exception
{
};
....
throw boost::(:link
+ 1
+
+ 0
+
+ -8
+
+
+ 2
+ :)(my_exception());@]
Unless (:link
+ 1
+
+ 0
+
+ -8
+
+
+ 2
+ :) is called at the time an exception object is used in a throw-expression, an attempt to copy it using (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :) may return an (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) which refers to an instance of (:link
+ 1
+
+ 0
+
+ -15
+
+
+ 2
+ :). See (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :) for details.
!!!!Note:
Instead of using the throw keyword directly, it is preferable to call boost::(:link
+ 1
+
+ 0
+
+ -21
+
+
+ 2
+ :). This is guaranteed to throw an exception that derives from boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) and supports the (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) functionality.
+
+
+
+
+ 0
+
+ -9
+
+
+
+ 29
+ 2
+ (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
The (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :) function must not be called outside of a catch block.
!!!!Returns:
* An (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) that refers to the currently handled exception or a copy of the currently handled exception.
* If the function needs to allocate memory and the attempt fails, it returns an (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) that refers to an instance of std::bad_alloc.
!!!!Throws:
Nothing.
!!!!Notes:
* It is unspecified whether the return values of two successive calls to (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :) refer to the same exception object.
* Correct implementation of (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :) may require compiler support, unless (:link
+ 1
+
+ 0
+
+ -8
+
+
+ 2
+ :) was used at the time the currently handled exception object was passed to throw. If (:link
+ 1
+
+ 0
+
+ -8
+
+
+ 2
+ :) was not used, and if the compiler does not provide the necessary support, then (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :) may return an (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) that refers to an instance of (:link
+ 1
+
+ 0
+
+ -15
+
+
+ 2
+ :). In this case, if the original exception object derives from boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :), then the boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) sub-object of the (:link
+ 1
+
+ 0
+
+ -15
+
+
+ 2
+ :) object is initialized by the boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) copy constructor.
@@ -4360,27 +4549,9 @@
- 5
+ 12
- (:auto !!!:)
(:include synopsis:)
!!!!Effects:
As if
[@try
{
throw
- 1
-
- 0
-
- -13
-
-
- 2
- (e);
}
catch(...)
{
return (:link
- 1
-
- 0
-
- -20
-
-
- 2
- :)();
}@]
+ (:auto !!!:)
(:include synopsis:)
!!!!Precondition:
ep shall not be null.
!!!!Throws:
The exception to which ep refers.
@@ -4391,63 +4562,54 @@
- 13
+ 112
- (:auto !!!:)
(:include synopsis:)
Class boost::(:link
+ (:auto !!!:)
Here is how cloning can be enabled in a throw-expression (15.1):
[@#include <(:link 10
- -11
+ -342
- :) is designed to be used as a universal base for user-defined exception types.
An object of any type deriving from boost::(:link
+ :)>
#include <stdio.h>
#include <errno.h>
typedef boost::error_info<struct tag_errno,int> errno_info;
class file_read_error: public boost::(:link 10
- -11
+ -242
- :) can store data of arbitrary types, using the (:link
+ :) { };
void
file_read( FILE * f, void * buffer, size_t size )
{
if( size!=fread(buffer,1,size,f) )
throw boost::(:link 10
- -31
+ -82
- :) wrapper and (:link
+ :)(file_read_error()) <<
errno_info(errno);
}@]
Of course, (:link 10
- -30
+ -82
- |operator<<:).
To retrieve data from a boost::(:link
+ :) may be used with any exception type; there is no requirement that it should derive from boost::(:link 10
- -11
+ -242
- :) object, use the (:link
- 1
-
- 0
-
- -29
-
-
- 2
- :) function template.
+ :).
@@ -4458,36 +4620,27 @@
- 7
+ 52
- (:auto !!!:)
(:include synopsis:)
This macro takes an exception object, records BOOST_CURRENT_FUNCTION, __FILE__ and __LINE__ in it, and forwards it to
+ (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
E must be boost::(:link 10
- -33
+ -242
- . To recover this information at the catch site, use
+ :), or a type that derives (indirectly) from boost::(:link 10
- -29
+ -242
- ; the information is also included in the message returned by
- 1
-
- 0
-
- -14
-
-
- 2
- .
+ :).
!!!!Effects:
Equivalent to x << v.(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements|get:)<0>() << ... << v.(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html#accessing_elements|get:)<N>().
!!!!Returns:
x.
(:include throws:)
@@ -4500,7 +4653,7 @@
212
- (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
T must be a class with an accessible no-throw copy constructor.
!!!!Returns:
An object of ''unspecified'' type which derives publicly from T. That is, the returned object can be intercepted by a catch(T &).
!!!!Description:
This function is designed to be used directly in a throw-expression to enable the (:link
+ (:auto !!!:)
Sometimes the throw site does not have all the information that is needed at the catch site to make sense of what went wrong. Here is an example:
[@#include <stdio.h>
#include <string>
class
file_read_error
{
public:
explicit
file_read_error( std::string const & fn ):
fn_(fn)
{
};
std::string const &
file_name() const
{
return fn_;
}
private:
std::string fn_;
};
void
file_read( FILE * f, void * buffer, size_t size )
{
if( size!=fread(buffer,1,size,f) )
throw file_read_error("????");
}@]
We have defined an exception class file_read_error which can store a file name, so that when we catch a file_read_error object, we know which file the failure is related to. However, the file_read function does not have the file name at the time of the throw; all it has is a FILE handle.
One possible solution is to not use FILE handles directly. We could have our own class file which stores both a FILE handle and a file name, and pass that to file_read. However, this could be problematic if we communicate with 3rd party code that does not use our class file (probably because they have their own similar class.)
A better solution is to make class file_read_error derive (possibly indirectly) from boost::(:link 10
@@ -4509,34 +4662,25 @@
2
- :) support in Boost Exception. For example:
[@class
my_exception:
public std::exception
{
};
....
throw boost::(:link
+ :), and free the file_read function from the burden of storing the file name in exceptions it throws:
[@#include <(:link 10
- -13
+ -62
- :)(my_exception());@]
Unless (:link
+ :)>
#include <stdio.h>
#include <errno.h>
typedef boost::(:link 10
- -13
+ -252
- :) is called at the time an exception object is used in a throw-expression, an attempt to copy it using (:link
- 1
-
- 0
-
- -20
-
-
- 2
- :) may return an (:link
+ :)<struct tag_errno,int> errno_info;
class file_read_error: public boost::(:link 10
@@ -4545,43 +4689,25 @@
2
- :) which refers to an instance of (:link
+ :) { };
void
file_read( FILE * f, void * buffer, size_t size )
{
if( size!=fread(buffer,1,size,f) )
throw file_read_error() << errno_info(errno);
}@]
If file_read detects a failure, it throws an exception which contains the information that is available at the time, namely the errno. Other relevant information, such as the file name, can be added in a context higher up the call stack, where it is known naturally:
[@#include <(:link 10
- -37
+ -62
- :). See (:link
+ :)>
#include <boost/shared_ptr.hpp>
#include <stdio.h>
#include <string>
typedef boost::(:link 10
- -20
+ -252
- :) for details.
!!!!Note:
Instead of using the throw keyword directly, it is preferable to call boost::(:link
- 1
-
- 0
-
- -33
-
-
- 2
- :). This is guaranteed to throw an exception that derives from boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) and supports the (:link
+ :)<struct tag_file_name,std::string> file_name_info;
boost::shared_ptr<FILE> file_open( char const * file_name, char const * mode );
void file_read( FILE * f, void * buffer, size_t size );
void
parse_file( char const * file_name )
{
boost::shared_ptr<FILE> f = file_open(file_name,"rb");
assert(f);
try
{
char buf[1024];
file_read( f.get(), buf, sizeof(buf) );
}
catch(
boost::(:link 10
@@ -4590,7 +4716,34 @@
2
- :) functionality.
+ :) & e )
{
e << file_name_info(file_name);
throw;
}
}@]
The above function is (almost) exception-neutral -- if an exception is emitted by any function call within the try block, parse_file does not need to do any real work, but it intercepts any boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) object, stores the file name, and re-throws using a throw-expression with no operand (15.1.6). The rationale for catching any boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) object is that the file name is relevant to any failure that occurs in parse_file, ''even if the failure is unrelated to file I/O''.
As usual, the stored data can be retrieved using (:link
+ 1
+
+ 0
+
+ -17
+
+
+ 2
+ :).
@@ -4601,36 +4754,81 @@
- 7
+ 172
- (:auto !!!:)
(:include synopsis:)
!!!!Returns:
This function iterates over all data objects stored in the boost::(:link
+ (:auto !!!:)
(:include synopsis:)
The (:link 10
- -11
+ -142
- :) through (:link
+ :) type can be used to refer to a copy of an exception object. It is Default Constructible, Copy Constructible, Assignable and Equality Comparable; (:link 10
- -30
+ -142
- |operator<<:). The returned string is constructed by converting each data object to string and then concatenating these strings together.
When the (:link
+ :)'s operations do not throw.
Two instances of (:link 10
- -31
+ -142
- :)<Tag,T> template is instantiated, the system attempts overload resolution for an unqualified call to to_string(x), where x is of type T. If this is successful, the to_string overload is expected to return std::string and is used to convert objects of type T to string.
Otherwise, the system attempts overload resolution for s << x, where s is a std::ostringstream and x is of type T. If this is successful, the operator<< overload is used to convert objects of type T to string.
Otherwise the system is unable to convert objects of type T to string, and an unspecified stub string value is used without issuing a compile error.
!!!!Notes:
*The format of the returned string is unspecified.
*The returned string is ''not'' user-friendly.
*If dynamic_cast<std::exception const *>(&x) is not null, the returned string includes the output from std::exception::what.
*The returned string may include additional platform-specific diagnostic information.
+ :) are equivalent and compare equal if and only if they refer to the same exception.
The default constructor of (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) produces the null value of the type. The null value is equivalent only to itself.
!!!!Thread safety
* It is legal for multiple threads to hold (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) references to the same exception object.
* It is illegal for multiple threads to modify the same (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) object concurrently.
* While calling (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :) makes a copy of the current exception object, it is still possible for the two copies to share internal state. Therefore, in general it is not safe to call (:link
+ 1
+
+ 0
+
+ -10
+
+
+ 2
+ :) concurrently to throw the same exception object into multiple threads.
@@ -4641,9 +4839,27 @@
- 1
+ 52
- (:auto !!:)
!!!Synopsis
(:include synopsis:)
+ (:auto !!!:)
(:include synopsis:)
This type is used by the (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) support in Boost Exception. Please see (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :).
@@ -4654,45 +4870,27 @@
- 17
+ 72
- (:auto !!:)
Boost Exception provides a namespace-scope function (:link
+ (:auto !!!:)
(:include decl:)
!!!!Effects:
* Default constructor: initializes an empty boost::(:link 10
- -14
+ -242
- :) which takes a boost::(:link
+ :) object.
* Copy constructor: initializes a boost::(:link 10
- -11
+ -242
- :). The returned string contains:
*the string representation of all data objects added to the boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) through (:link
- 1
-
- 0
-
- -30
-
-
- 2
- |operator<<:);
*the output from std::exception::what;
*additional platform-specific diagnostic information.
The returned string is not presentable as a friendly user message, but because it is generated automatically, it is useful for debugging or logging purposes. Here is an example:
[@#include <(:link
+ :) object which shares ownership with x of all data added through (:link 10
@@ -4701,34 +4899,7 @@
2
- :)>
#include <iostream>
void f(); //throws unknown types that derive from boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :).
void
g()
{
try
{
f();
}
catch(
boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) & e )
{
std::cerr << (:link
- 1
-
- 0
-
- -14
-
-
- 2
- :)(e);
}
}@]
+ |operator<<:), including data that is added at a future time.
!!!!Throws:
Nothing.
@@ -4739,286 +4910,9 @@
- 1
+ 92
- (:auto !!:)
!!!Synopsis
(:include synopsis:)
-
-
-
-
- 0
-
- -18
-
-
-
- 5
- 2
- (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
T must be a class with an accessible no-throw copy constructor as per (15.5.1).
!!!!Returns:
* If T derives from boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :), the returned object is of type T and is a copy of x.
* Otherwise, the returned object is of an unspecified type that derives publicly from both T and boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :). The T sub-object is initialized from x by the T copy constructor.
!!!!Throws:
Nothing.
-
-
-
-
- 0
-
- -19
-
-
-
- 13
- 2
- (:auto !!!:)
The code snippet below demonstrates how boost::(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:) can be used to bundle the name of the function that failed, together with the reported errno so that they can be added to exception objects more conveniently together:
[@#include <(:link
- 1
-
- 0
-
- -8
-
-
- 2
- :)>
#include <boost/shared_ptr.hpp>
#include <stdio.h>
#include <string>
#include <errno.h>
typedef boost::(:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<struct tag_file_name,std::string> file_name_info;
typedef boost::(:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<struct tag_function,char const *> function_info;
typedef boost::(:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<struct tag_errno,int> errno_info;
typedef boost::tuple<function_info,errno_info> clib_failure;
class file_open_error: public boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) { };
boost::shared_ptr<FILE>
file_open( char const * name, char const * mode )
{
if( FILE * f=fopen(name,mode) )
return boost::shared_ptr<FILE>(f,fclose);
else
throw file_open_error() <<
file_name_info(name) <<
clib_failure("fopen",errno);
}@]
Note that the members of a boost::(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:) are stored separately in exception objects; they can only be retrieved individually, using (:link
- 1
-
- 0
-
- -29
-
-
- 2
- :).
-
-
-
-
- 0
-
- -20
-
-
-
- 29
- 2
- (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
The (:link
- 1
-
- 0
-
- -20
-
-
- 2
- :) function must not be called outside of a catch block.
!!!!Returns:
* An (:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) that refers to the currently handled exception or a copy of the currently handled exception.
* If the function needs to allocate memory and the attempt fails, it returns an (:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) that refers to an instance of std::bad_alloc.
!!!!Throws:
Nothing.
!!!!Notes:
* It is unspecified whether the return values of two successive calls to (:link
- 1
-
- 0
-
- -20
-
-
- 2
- :) refer to the same exception object.
* Correct implementation of (:link
- 1
-
- 0
-
- -20
-
-
- 2
- :) may require compiler support, unless (:link
- 1
-
- 0
-
- -13
-
-
- 2
- :) was used at the time the currently handled exception object was passed to throw. If (:link
- 1
-
- 0
-
- -13
-
-
- 2
- :) was not used, and if the compiler does not provide the necessary support, then (:link
- 1
-
- 0
-
- -20
-
-
- 2
- :) may return an (:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) that refers to an instance of (:link
- 1
-
- 0
-
- -37
-
-
- 2
- :). In this case, if the original exception object derives from boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :), then the boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) sub-object of the (:link
- 1
-
- 0
-
- -37
-
-
- 2
- :) object is initialized by the boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) copy constructor.
-
-
-
-
- 0
-
- -21
-
-
-
- 11
- 2
- (:auto !!:)
Boost Exception supports transporting of exception objects between threads through cloning. This system is similar to (:link http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html|N2179:), but because Boost Exception can not rely on language support, the use of (:link
- 1
-
- 0
-
- -13
-
-
- 2
- :) at the time of the throw is required in order to use cloning.
!!!!Note:
All exceptions emitted by the familiar function boost::(:link
- 1
-
- 0
-
- -33
-
-
- 2
- :) are guaranteed to derive from boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) and to support cloning.
(:include
+ (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
* ErrorInfo must be an instance of the (:link 10
@@ -5027,413 +4921,12 @@
2
- :)
(:include
- 1
-
- 0
-
- -22
-
-
- 2
- :)
-
-
-
-
- 0
-
- -22
-
-
-
- 37
- 2
- (:auto !!!:)
When you catch an exception, you can call (:link
- 1
-
- 0
-
- -20
-
-
- 2
- :) to get an (:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) object:
[@#include <(:link
- 1
-
- 0
-
- -28
-
-
- 2
- :)>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
void do_work(); //throws cloning-enabled boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :)s
void
worker_thread( boost::(:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) & error )
{
try
{
do_work();
error = boost::(:link
- 1
-
- 0
-
- -24
-
-
- 2
- :)();
}
catch(
... )
{
error = boost::(:link
- 1
-
- 0
-
- -20
-
-
- 2
- :)();
}
}@]
In the above example, note that (:link
- 1
-
- 0
-
- -20
-
-
- 2
- :) captures the original type of the exception object. The exception can be thrown again using the (:link
- 1
-
- 0
-
- -36
-
-
- 2
- :) function:
[@// ...continued
void
work()
{
boost::(:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) error;
boost::(:link http://www.boost.org/doc/html/boost/thread.html|thread:) t( boost::(:link http://www.boost.org/libs/bind/bind.html|bind:)(worker_thread,boost::(:link http://www.boost.org/doc/html/ref.html|ref:)(error)) );
t.(:link http://www.boost.org/doc/html/boost/thread.html|join:)();
if( error )
boost::(:link
- 1
-
- 0
-
- -36
-
-
- 2
- :)(error);
}@]
Note that (:link
- 1
-
- 0
-
- -20
-
-
- 2
- :) could fail to copy the original exception object in the following cases:
* if there is not enough memory, in which case the returned (:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) points to an instance of std::bad_alloc, or
* if (:link
- 1
-
- 0
-
- -13
-
-
- 2
- :) was not used in the throw-expression passed to the original throw statement and the current implementation does not have the necessary compiler-specific support to copy the exception automatically, in which case the returned (:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) points to an instance of (:link
- 1
-
- 0
-
- -37
-
-
- 2
- :).
Regardless, the use of (:link
- 1
-
- 0
-
- -20
-
-
- 2
- :) and (:link
- 1
-
- 0
-
- -36
-
-
- 2
- :) in the above examples is well-formed.
-
-
-
-
- 0
-
- -23
-
-
-
- 1
- 2
- (:auto !!:)
!!!Synopsis
(:include synopsis:)
-
-
-
-
- 0
-
- -24
-
-
-
- 17
- 2
- (:auto !!!:)
(:include synopsis:)
The (:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) type can be used to refer to a copy of an exception object. It is Default Constructible, Copy Constructible, Assignable and Equality Comparable; (:link
- 1
-
- 0
-
- -24
-
-
- 2
- :)'s operations do not throw.
Two instances of (:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) are equivalent and compare equal if and only if they refer to the same exception.
The default constructor of (:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) produces the null value of the type. The null value is equivalent only to itself.
!!!!Thread safety
* It is legal for multiple threads to hold (:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) references to the same exception object.
* It is illegal for multiple threads to modify the same (:link
- 1
-
- 0
-
- -24
-
-
- 2
- :) object concurrently.
* While calling
- 1
-
- 0
-
- -20
-
-
- 2
- makes a copy of the current exception object, it is still possible for the two copies to share internal state. Therefore, in general it is not safe to call
- 1
-
- 0
-
- -36
-
-
- 2
- to throw the same exception object concurrently into multiple threads.
-
-
-
-
- 0
-
- -25
-
-
-
- 11
- 2
- (:auto !!!:)
Here is how cloning can be enabled in a throw-expression (15.1):
[@#include <(:link
- 1
-
- 0
-
- -15
-
-
- 2
- :)>
#include <stdio.h>
#include <errno.h>
typedef boost::error_info<struct tag_errno,int> errno_info;
class file_read_error: public boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) { };
void
file_read( FILE * f, void * buffer, size_t size )
{
if( size!=fread(buffer,1,size,f) )
throw boost::(:link
- 1
-
- 0
-
- -13
-
-
- 2
- :)(file_read_error()) <<
errno_info(errno);
}@]
Of course, (:link
- 1
-
- 0
-
- -13
-
-
- 2
- :) may be used with any exception type; there is no requirement that it should derive from boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :).
-
-
-
-
- 0
-
- -26
-
-
-
- 1
- 2
- (:auto !!:)
!!!Synopsis
(:include synopsis:)
-
-
-
-
- 0
-
- -27
-
-
-
- 1
- 2
- (:auto !!:)
!!!Synopsis
(:include synopsis:)
-
-
-
-
- 0
-
- -28
-
-
-
- 1
- 2
- (:auto !!:)
!!!Synopsis
(:include synopsis:)
-
-
-
-
- 0
-
- -29
-
-
-
- 9
- 2
- (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
* ErrorInfo must be an instance of the (:link
- 1
-
- 0
-
- -31
-
-
- 2:) template.
* E must be polymorphic.
* The 10
- -29
+ -172
@@ -5442,7 +4935,7 @@
0
- -11
+ -242
@@ -5451,7 +4944,7 @@
0
- -30
+ -262
@@ -5462,47 +4955,146 @@
0
- -30
+ -18
- 7
+ 12
- (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
E must be boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :), or a type that derives (indirectly) from boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :).
!!!!Effects:
Stores a copy of v into x. If x already contains data of type (:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<Tag,T>, that data is overwritten.
!!!!Returns:
x.
(:include throws:)
+ (:auto !!:)
!!!Synopsis
(:include synopsis:)
0
- -31
+ -19
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -35
+
+
+
+ 1
+ 2
+ (:auto !!:)
!!!Synopsis
(:include synopsis:)
+
+
+
+
+ 0
+
+ -38
+
+
+
+ 13
+ 2
+ (:auto !!!:)
The code snippet below demonstrates how boost::(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:) can be used to bundle the name of the function that failed, together with the reported errno so that they can be added to exception objects more conveniently together:
[@#include <(:link
+ 1
+
+ 0
+
+ -18
+
+
+ 2
+ :)>
#include <boost/shared_ptr.hpp>
#include <stdio.h>
#include <string>
#include <errno.h>
typedef boost::(:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)<struct tag_file_name,std::string> file_name_info;
typedef boost::(:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)<struct tag_function,char const *> function_info;
typedef boost::(:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)<struct tag_errno,int> errno_info;
typedef boost::tuple<function_info,errno_info> clib_failure;
class file_open_error: public boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) { };
boost::shared_ptr<FILE>
file_open( char const * name, char const * mode )
{
if( FILE * f=fopen(name,mode) )
return boost::shared_ptr<FILE>(f,fclose);
else
throw file_open_error() <<
file_name_info(name) <<
clib_failure("fopen",errno);
}@]
Note that the members of a boost::(:link http://www.boost.org/libs/tuple/doc/tuple_users_guide.html|tuple:) are stored separately in exception objects; they can only be retrieved individually, using (:link
+ 1
+
+ 0
+
+ -17
+
+
+ 2
+ :).
+
+
+
+
+ 0
+
+ -39
+
+
+
+ 3
+ 2
+ (:auto !!!:)
(:include decl:)
!!!!Effects:
Frees all resources associated with a boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) object.
!!!!Throws:
Nothing.
+
+
+
+
+ 0
+
+ -30
+
+
+
+ 1
+ 2
+ (:auto !!:)
!!!Synopsis
(:include synopsis:)
+
+
+
+
+ 0
+
+ -25
@@ -5513,7 +5105,7 @@
0
- -31
+ -252
@@ -5522,7 +5114,7 @@
0
- -30
+ -262
@@ -5531,7 +5123,7 @@
0
- -11
+ -242
@@ -5540,7 +5132,7 @@
0
- -39
+ -312
@@ -5549,7 +5141,7 @@
0
- -31
+ -252
@@ -5558,7 +5150,7 @@
0
- -39
+ -312
@@ -5567,7 +5159,7 @@
0
- -31
+ -252
@@ -5576,7 +5168,7 @@
0
- -31
+ -252
@@ -5585,7 +5177,7 @@
0
- -11
+ -242
@@ -5594,7 +5186,7 @@
0
- -30
+ -262
@@ -5603,7 +5195,7 @@
0
- -29
+ -172
@@ -5612,7 +5204,7 @@
0
- -15
+ -342
@@ -5623,7 +5215,137 @@
0
- -32
+ -23
+
+
+
+ 27
+ 2
+ (:auto !!:)
Some exception hierarchies can not be modified to make boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) a base type. In this case, the (:link
+ 1
+
+ 0
+
+ -27
+
+
+ 2
+ :) function template can be used to make exception objects derive from boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) anyway. Here is an example:
[@#include <(:link
+ 1
+
+ 0
+
+ -6
+
+
+ 2
+ :)>
#include <stdexcept>
typedef boost::(:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)<struct tag_std_range_min,size_t> std_range_min;
typedef boost::(:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)<struct tag_std_range_max,size_t> std_range_max;
typedef boost::(:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)<struct tag_std_range_index,size_t> std_range_index;
template <class T>
class
my_container
{
public:
size_t size() const;
T const &
operator[]( size_t i ) const
{
if( i > size() )
throw boost::(:link
+ 1
+
+ 0
+
+ -27
+
+
+ 2
+ :)(std::range_error("Index out of range")) <<
std_range_min(0) <<
std_range_max(size()) <<
std_range_index(i);
//....
}
};
@]
The call to (:link
+ 1
+
+ 0
+
+ -27
+
+
+ 2
+ :)<T> gets us an object of ''unspecified type'' which is guaranteed to derive from both boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) and T. This makes it possible to use (:link
+ 1
+
+ 0
+
+ -26
+
+
+ 2
+ |operator<<:) to store additional information in the exception object. The exception can be intercepted as T &, so existing exception handling will not break. It can also be intercepted as boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) &, so that (:link
+ 1
+
+ 0
+
+ -22
+
+
+ 2
+ |more information can be added to the exception at a later time:).
+
+
+
+
+ 0
+
+ -37
@@ -5637,19 +5359,6 @@
-36
-
- 1
- 2
- (:auto !!!:)
(:include synopsis:)
!!!!Precondition:
ep shall not be null.
!!!!Throws:
The exception to which ep refers.
-
-
-
-
- 0
-
- -38
-
- 12
@@ -5660,315 +5369,13 @@
0
- -35
-
-
-
- 27
- 2
- (:auto !!:)
Some exception hierarchies can not be modified to make boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) a base type. In this case, the (:link
- 1
-
- 0
-
- -18
-
-
- 2
- :) function template can be used to make exception objects derive from boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) anyway. Here is an example:
[@#include <(:link
- 1
-
- 0
-
- -26
-
-
- 2
- :)>
#include <stdexcept>
typedef boost::(:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<struct tag_std_range_min,size_t> std_range_min;
typedef boost::(:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<struct tag_std_range_max,size_t> std_range_max;
typedef boost::(:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<struct tag_std_range_index,size_t> std_range_index;
template <class T>
class
my_container
{
public:
size_t size() const;
T const &
operator[]( size_t i ) const
{
if( i > size() )
throw boost::(:link
- 1
-
- 0
-
- -18
-
-
- 2
- :)(std::range_error("Index out of range")) <<
std_range_min(0) <<
std_range_max(size()) <<
std_range_index(i);
//....
}
};
@]
The call to (:link
- 1
-
- 0
-
- -18
-
-
- 2
- :)<T> gets us an object of ''unspecified type'' which is guaranteed to derive from both boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) and T. This makes it possible to use (:link
- 1
-
- 0
-
- -30
-
-
- 2
- |operator<<:) to store additional information in the exception object. The exception can be intercepted as T &, so existing exception handling will not break. It can also be intercepted as boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) &, so that (:link
- 1
-
- 0
-
- -34
-
-
- 2
- |more information can be added to the exception at a later time:).
-
-
-
-
- 0
-
- -41
-
-
-
- 21
- 2
- (:auto !!!:)
Sometimes the throw site does not have all the information that is needed at the catch site to make sense of what went wrong. Here is an example:
[@#include <stdio.h>
#include <string>
class
file_read_error
{
public:
explicit
file_read_error( std::string const & fn ):
fn_(fn)
{
};
std::string const &
file_name() const
{
return fn_;
}
private:
std::string fn_;
};
void
file_read( FILE * f, void * buffer, size_t size )
{
if( size!=fread(buffer,1,size,f) )
throw file_read_error("????");
}@]
We have defined an exception class file_read_error which can store a file name, so that when we catch a file_read_error object, we know which file the failure is related to. However, the file_read function does not have the file name at the time of the throw; all it has is a FILE handle.
One possible solution is to not use FILE handles directly. We could have our own class file which stores both a FILE handle and a file name, and pass that to file_read. However, this could be problematic if we communicate with 3rd party code that does not use our class file (probably because they have their own similar class.)
A better solution is to make class file_read_error derive (possibly indirectly) from boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :), and free the file_read function from the burden of storing the file name in exceptions it throws:
[@#include <(:link
- 1
-
- 0
-
- -26
-
-
- 2
- :)>
#include <stdio.h>
#include <errno.h>
typedef boost::(:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<struct tag_errno,int> errno_info;
class file_read_error: public boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) { };
void
file_read( FILE * f, void * buffer, size_t size )
{
if( size!=fread(buffer,1,size,f) )
throw file_read_error() << errno_info(errno);
}@]
If file_read detects a failure, it throws an exception which contains the information that is available at the time, namely the errno. Other relevant information, such as the file name, can be added in a context higher up the call stack, where it is known naturally:
[@#include <(:link
- 1
-
- 0
-
- -26
-
-
- 2
- :)>
#include <boost/shared_ptr.hpp>
#include <stdio.h>
#include <string>
typedef boost::(:link
- 1
-
- 0
-
- -31
-
-
- 2
- :)<struct tag_file_name,std::string> file_name_info;
boost::shared_ptr<FILE> file_open( char const * file_name, char const * mode );
void file_read( FILE * f, void * buffer, size_t size );
void
parse_file( char const * file_name )
{
boost::shared_ptr<FILE> f = file_open(file_name,"rb");
assert(f);
try
{
char buf[1024];
file_read( f.get(), buf, sizeof(buf) );
}
catch(
boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) & e )
{
e << file_name_info(file_name);
throw;
}
}@]
The above function is (almost) exception-neutral -- if an exception is emitted by any function call within the try block, parse_file does not need to do any real work, but it intercepts any boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) object, stores the file name, and re-throws using a throw-expression with no operand (15.1.6). The rationale for catching any boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) object is that the file name is relevant to any failure that occurs in parse_file, ''even if the failure is unrelated to file I/O''.
As usual, the stored data can be retrieved using (:link
- 1
-
- 0
-
- -29
-
-
- 2
- :).
-
-
-
-
- 0
-
- -34
-
-
-
- 11
- 2
- (:auto !!:)
All exception types that derive from boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) can be used as type-safe containers of arbitrary data objects, while complying with the no-throw requirements (15.5.1) of the ANSI C++ standard for exception types. Data can be added to a boost::(:link
- 1
-
- 0
-
- -11
-
-
- 2
- :) at the time of the throw, or at a later time.
(:include
- 1
-
- 0
-
- -6
-
-
- 2
- :)
(:include
- 1
-
- 0
-
- -41
-
-
- 2
- :)
(:include
- 1
-
- 0
-
- -19
-
-
- 2
- :)
-
-
-
-
- 0
-
- -40
-
-
-
- 0
-
-
-
-
- 0
-
- -37
+ -2752
- (:auto !!!:)
(:include synopsis:)
This type is used by the (:link
+ (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
T must be a class with an accessible no-throw copy constructor as per (15.5.1).
!!!!Returns:
* If T derives from boost::(:link 10
@@ -5977,23 +5384,94 @@
2
- :) support in Boost Exception. Please see (:link
+ :), the returned object is of type T and is a copy of x.
* Otherwise, the returned object is of an unspecified type that derives publicly from both T and boost::(:link 10
- -20
+ -242
- :).
+ :). The T sub-object is initialized from x by the T copy constructor.
!!!!Throws:
Nothing.
0
- -39
+ -29
+
+
+
+ 7
+ 2
+ (:auto !!!:)
(:include synopsis:)
This macro takes an exception object, records BOOST_CURRENT_FUNCTION, __FILE__ and __LINE__ in it, and forwards it to
+ 1
+
+ 0
+
+ -21
+
+
+ 2
+ . To recover this information at the catch site, use
+ 1
+
+ 0
+
+ -17
+
+
+ 2
+ ; the information is also included in the message returned by
+ 1
+
+ 0
+
+ -5
+
+
+ 2
+ .
+
+
+
+
+ 0
+
+ -28
+
+
+
+ 5
+ 2
+ (:auto !!!:)
(:include synopsis:)
!!!!Effects:
As if
[@try
{
throw
+ 1
+
+ 0
+
+ -8
+
+
+ 2
+ (e);
}
catch(...)
{
return (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :)();
}@]
+
+
+
+
+ 0
+
+ -34
@@ -6009,6 +5487,112 @@
-33
+
+ 1
+ 2
+ (:auto !!:)
!!!Synopsis
(:include synopsis:)
+
+
+
+
+ 0
+
+ -32
+
+
+
+ 1
+ 2
+ (:auto !!:)
!!!Synopsis
(:include synopsis:)
+
+
+
+
+ 0
+
+ -31
+
+
+
+ 1
+ 2
+ (:auto !!:)
!!!Synopsis
(:include synopsis:)
+
+
+
+
+ 0
+
+ -24
+
+
+
+ 13
+ 2
+ (:auto !!!:)
(:include synopsis:)
Class boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) is designed to be used as a universal base for user-defined exception types.
An object of any type deriving from boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) can store data of arbitrary types, using the (:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :) wrapper and (:link
+ 1
+
+ 0
+
+ -26
+
+
+ 2
+ |operator<<:).
To retrieve data from a boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) object, use the (:link
+ 1
+
+ 0
+
+ -17
+
+
+ 2
+ :) function template.
+
+
+
+
+ 0
+
+ -21
+
+ 132
@@ -6017,7 +5601,7 @@
0
- -33
+ -212
@@ -6026,7 +5610,7 @@
0
- -13
+ -82
@@ -6035,7 +5619,7 @@
0
- -18
+ -272
@@ -6044,7 +5628,7 @@
0
- -33
+ -212
@@ -6053,7 +5637,7 @@
0
- -33
+ -212
@@ -6062,13 +5646,429 @@
0
- -33
+ -212:) returns, the behavior is undefined.
+
+
+ 0
+
+ -20
+
+
+
+ 11
+ 2
+ (:auto !!:)
Boost Exception supports transporting of exception objects between threads through cloning. This system is similar to (:link http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html|N2179:), but because Boost Exception can not rely on language support, the use of (:link
+ 1
+
+ 0
+
+ -8
+
+
+ 2
+ :) at the time of the throw is required in order to use cloning.
!!!!Note:
All exceptions emitted by the familiar function boost::(:link
+ 1
+
+ 0
+
+ -21
+
+
+ 2
+ :) are guaranteed to derive from boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) and to support cloning.
(:include
+ 1
+
+ 0
+
+ -11
+
+
+ 2
+ :)
(:include
+ 1
+
+ 0
+
+ -40
+
+
+ 2
+ :)
+
+
+
+
+ 0
+
+ -40
+
+
+
+ 37
+ 2
+ (:auto !!!:)
When you catch an exception, you can call (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :) to get an (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) object:
[@#include <(:link
+ 1
+
+ 0
+
+ -35
+
+
+ 2
+ :)>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
void do_work(); //throws cloning-enabled boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :)s
void
worker_thread( boost::(:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) & error )
{
try
{
do_work();
error = boost::(:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :)();
}
catch(
... )
{
error = boost::(:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :)();
}
}@]
In the above example, note that (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :) captures the original type of the exception object. The exception can be thrown again using the (:link
+ 1
+
+ 0
+
+ -10
+
+
+ 2
+ :) function:
[@// ...continued
void
work()
{
boost::(:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) error;
boost::(:link http://www.boost.org/doc/html/boost/thread.html|thread:) t( boost::(:link http://www.boost.org/libs/bind/bind.html|bind:)(worker_thread,boost::(:link http://www.boost.org/doc/html/ref.html|ref:)(error)) );
t.(:link http://www.boost.org/doc/html/boost/thread.html|join:)();
if( error )
boost::(:link
+ 1
+
+ 0
+
+ -10
+
+
+ 2
+ :)(error);
}@]
Note that (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :) could fail to copy the original exception object in the following cases:
* if there is not enough memory, in which case the returned (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) points to an instance of std::bad_alloc, or
* if (:link
+ 1
+
+ 0
+
+ -8
+
+
+ 2
+ :) was not used in the throw-expression passed to the original throw statement and the current implementation does not have the necessary compiler-specific support to copy the exception automatically, in which case the returned (:link
+ 1
+
+ 0
+
+ -14
+
+
+ 2
+ :) points to an instance of (:link
+ 1
+
+ 0
+
+ -15
+
+
+ 2
+ :).
Regardless, the use of (:link
+ 1
+
+ 0
+
+ -9
+
+
+ 2
+ :) and (:link
+ 1
+
+ 0
+
+ -10
+
+
+ 2
+ :) in the above examples is well-formed.
+
+
+
+
+ 0
+
+ -22
+
+
+
+ 11
+ 2
+ (:auto !!:)
All exception types that derive from boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) can be used as type-safe containers of arbitrary data objects, while complying with the no-throw requirements (15.5.1) of the ANSI C++ standard for exception types. Data can be added to a boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :) at the time of the throw, or at a later time.
(:include
+ 1
+
+ 0
+
+ -41
+
+
+ 2
+ :)
(:include
+ 1
+
+ 0
+
+ -13
+
+
+ 2
+ :)
(:include
+ 1
+
+ 0
+
+ -38
+
+
+ 2
+ :)
+
+
+
+
+ 0
+
+ -26
+
+
+
+ 7
+ 2
+ (:auto !!!:)
(:include synopsis:)
!!!!Requirements:
E must be boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :), or a type that derives (indirectly) from boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :).
!!!!Effects:
Stores a copy of v into x. If x already contains data of type (:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)<Tag,T>, that data is overwritten.
!!!!Returns:
x.
(:include throws:)
+
+
+
+
+ 0
+
+ -41
+
+
+
+ 17
+ 2
+ (:auto !!!:)
The following example demonstrates how errno can be stored in exception objects using Boost Exception:
[@#include <(:link
+ 1
+
+ 0
+
+ -6
+
+
+ 2
+ :)>
#include <errno.h>
#include <iostream>
typedef boost::(:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :)<struct tag_errno,int> errno_info; //(1)
class my_error: public boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :), public std::exception { }; //(2)
void
f()
{
throw my_error() << errno_info(errno); //(3)
}
@]
First, we instantiate the (:link
+ 1
+
+ 0
+
+ -25
+
+
+ 2
+ :) template using a unique identifier -- tag_errno, and the type of the info it identifies -- int. This provides compile-time type safety for the various values stored in exception objects.
Second, we define class my_error, which derives from boost::(:link
+ 1
+
+ 0
+
+ -24
+
+
+ 2
+ :).
Finally, (3) illustrates how the typedef from (1) can be used with (:link
+ 1
+
+ 0
+
+ -26
+
+
+ 2
+ |operator<<:) to store values in exception objects at the point of the throw.
The stored errno value can be recovered at a later time like this:
[@// ...continued
void
g()
{
try
{
f();
}
catch(
my_error & x )
{
if( boost::shared_ptr<int const> err=boost::(:link
+ 1
+
+ 0
+
+ -17
+
+
+ 2
+ :)<errno_info>(x) )
std::cerr << "Error code: " << *err;
}
}@]
The (:link
+ 1
+
+ 0
+
+ -17
+
+
+ 2
+ :) function template is instantiated with the typedef from (1), and is passed an exception object of a polymorphic type. If the exception object contains the requested value, the returned (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:) will point to it; otherwise an empty (:link http://www.boost.org/libs/smart_ptr/shared_ptr.htm|shared_ptr:) is returned.
+
+
@@ -6091,9 +6091,7 @@
- 1
- 2
- !!!!Throws:
std::bad_alloc, or any exception emitted by T1..TN copy constructor.
+ 0
@@ -6170,7 +6168,9 @@
- 0
+ 1
+ 2
+ !!!!Throws:
std::bad_alloc, or any exception emitted by T1..TN copy constructor.
@@ -6254,152 +6254,7 @@
0
- -20
-
-
-
- 0
-
-
-
-
- 0
-
- -21
-
-
-
- 0
-
-
-
-
- 0
-
- -22
-
-
-
- 0
-
-
-
-
- 0
-
- -23
-
-
-
- 0
-
-
-
-
- 0
-
- -24
-
-
-
- 0
-
-
-
-
- 0
-
- -25
-
-
-
- 0
-
-
-
-
- 0
-
- -26
-
-
-
- 0
-
-
-
-
- 0
-
- -27
-
-
-
- 0
-
-
-
-
- 0
-
- -28
-
-
-
- 0
-
-
-
-
- 0
-
- -29
-
-
-
- 0
-
-
-
-
- 0
-
- -30
-
-
-
- 1
- 2
- !!!!Throws:
std::bad_alloc, or any exception emitted by the T copy constructor.
-
-
-
-
- 0
-
- -31
-
-
-
- 0
-
-
-
-
- 0
-
- -32
-
-
-
- 0
-
-
-
-
- 0
-
- -36
+ -35
@@ -6421,7 +6276,7 @@
0
- -35
+ -39
@@ -6432,7 +6287,7 @@
0
- -41
+ -30
@@ -6443,7 +6298,7 @@
0
- -34
+ -25
@@ -6454,7 +6309,7 @@
0
- -40
+ -23
@@ -6476,7 +6331,51 @@
0
- -39
+ -36
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -27
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -29
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -28
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -34
@@ -6494,6 +6393,107 @@
0
+
+
+ 0
+
+ -32
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -31
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -24
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -21
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -20
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -40
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -22
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -26
+
+
+
+ 1
+ 2
+ !!!!Throws:
std::bad_alloc, or any exception emitted by the T copy constructor.
+
+
+
+
+ 0
+
+ -41
+
+
+
+ 0
+
+
@@ -6516,27 +6516,18 @@
- 5
+ 32`#include <(:link 10
- -8
+ -302
- :)>
[@namespace
boost
{
(:include
- 1
-
- 0
-
- -5
-
-
- 2
- decl pre_indent="4":)
}@]
+ :)>\\
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -6547,7 +6538,9 @@
- 0
+ 1
+ 2
+ [@(:include api:)@]
@@ -6569,9 +6562,18 @@
- 1
+ 32
- [@#include <boost/tuple/tuple.hpp>
namespace
boost
{
(:include api pre_indent="4":)
}@]
+ `#include <
+ 1
+
+ 0
+
+ -32
+
+
+ 2
+ >
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -6582,7 +6584,18 @@
- 0
+ 3
+ 2
+ `#include <(:link
+ 1
+
+ 0
+
+ -35
+
+
+ 2
+ :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -6600,7 +6613,7 @@
0
- -28
+ -352
@@ -6615,18 +6628,7 @@
- 3
- 2
- `#include <(:link
- 1
-
- 0
-
- -17
-
-
- 2
- :)>
[@namespace
boost
{
(:include def pre_indent="4":)
}@]
+ 0
@@ -6637,18 +6639,27 @@
- 3
+ 52
- `#include <
+ `#include <(:link 10
- -27
+ -182
- >
(:include decl:)
+ :)>
[@namespace
boost
{
(:include
+ 1
+
+ 0
+
+ -12
+
+
+ 2
+ decl pre_indent="4":)
}@]
@@ -6659,18 +6670,7 @@
- 3
- 2
- `#include <
- 1
-
- 0
-
- -17
-
-
- 2
- >
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ 0
@@ -6688,11 +6688,11 @@
0
- -38
+ -352
- :)>\\
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -6705,16 +6705,16 @@
32
- [@#include <(:link
+ `#include <(:link 10
- -17
+ -352
- :)>
#include <boost/current_function.hpp>
#include <boost/shared_ptr.hpp>
namespace
boost
{
(:include api pre_indent="4":)
}@]
+ :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -6736,9 +6736,18 @@
- 1
+ 32
- [@namespace
boost
{
(:include api pre_indent="4":)
}@]
+ `#include <
+ 1
+
+ 0
+
+ -33
+
+
+ 2
+ >
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -6749,18 +6758,9 @@
- 3
+ 12
- `#include <
- 1
-
- 0
-
- -17
-
-
- 2
- >
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ [@#include <boost/tuple/tuple.hpp>
namespace
boost
{
(:include api pre_indent="4":)
}@]
@@ -6778,29 +6778,29 @@
0
- -20
+ -3532
- `#include <(:link
+ [@#include <(:link 10
- -28
+ -322
- :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ :)>
namespace
boost
{
(:include api pre_indent="4":)
}@]
0
- -21
+ -38
@@ -6811,7 +6811,7 @@
0
- -22
+ -39
@@ -6822,35 +6822,13 @@
0
- -23
+ -3012
- [@#include <boost/shared_ptr.hpp>
namespace
boost
{
(:include api pre_indent="4":)
}@]
-
-
-
-
- 0
-
- -24
-
-
-
- 3
- 2
- `#include <(:link
- 1
-
- 0
-
- -28
-
-
- 2
- :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ [@#include <exception>
#include <string>
namespace
boost
{
(:include api pre_indent="4":)
}@]
@@ -6860,6 +6838,28 @@
-25
+
+ 3
+ 2
+ `#include <(:link
+ 1
+
+ 0
+
+ -34
+
+
+ 2
+ :)>
[@namespace
boost
{
(:include def pre_indent="4":)
}@]
+
+
+
+
+ 0
+
+ -23
+
+ 0
@@ -6868,20 +6868,18 @@
0
- -26
+ -37
- 1
- 2
- [@(:include api:)@]
+ 00
- -27
+ -36
@@ -6894,22 +6892,22 @@
0
- -28
+ -2732
- [@#include <(:link
+ `#include <10
- -17
+ -322
- :)>
namespace
boost
{
(:include api pre_indent="4":)
}@]
+ >
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
@@ -6927,18 +6925,18 @@
0
- -23
+ -362
- >
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ >
(:include decl:)
0
- -30
+ -28
@@ -6949,62 +6947,7 @@
0
- -15
-
-
- 2
- :)>\\
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
-
-
-
-
- 0
-
- -31
-
-
-
- 3
- 2
- `#include <(:link
- 1
-
- 0
-
- -15
-
-
- 2
- :)>
[@namespace
boost
{
(:include def pre_indent="4":)
}@]
-
-
-
-
- 0
-
- -32
-
-
-
- 0
-
-
-
-
- 0
-
- -36
-
-
-
- 3
- 2
- `#include <(:link
- 1
-
- 0
-
- -28
+ -352
@@ -7015,42 +6958,112 @@
0
- -38
+ -34
+
+
+
+ 3
+ 2
+ [@#include <(:link
+ 1
+
+ 0
+
+ -32
+
+
+ 2
+ :)>
#include <boost/current_function.hpp>
#include <boost/shared_ptr.hpp>
namespace
boost
{
(:include api pre_indent="4":)
}@]
+
+
+
+
+ 0
+
+ -3312
- [@#include <exception>
#include <string>
namespace
boost
{
(:include api pre_indent="4":)
}@]
+ [@#include <boost/shared_ptr.hpp>
namespace
boost
{
(:include api pre_indent="4":)
}@]
0
- -35
+ -32
- 0
+ 1
+ 2
+ [@namespace
boost
{
(:include api pre_indent="4":)
}@]
0
- -41
+ -31
- 0
+ 1
+ 2
+ [@namespace
boost
{
(:include api pre_indent="4":)
}@]
0
- -34
+ -24
+
+
+
+ 3
+ 2
+ `#include <(:link
+ 1
+
+ 0
+
+ -32
+
+
+ 2
+ :)>
[@namespace
boost
{
(:include def pre_indent="4":)
}@]
+
+
+
+
+ 0
+
+ -21
+
+
+
+ 3
+ 2
+ `#include <(:link
+ 1
+
+ 0
+
+ -36
+
+
+ 2
+ :)>
[@namespace
boost
{
(:include decl:)
}@]
+
+
+
+
+ 0
+
+ -20
@@ -7072,7 +7085,18 @@
0
- -37
+ -22
+
+
+
+ 0
+
+
+
+
+ 0
+
+ -26
@@ -7083,46 +7107,22 @@
0
- -28
+ -342
- :)>
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
+ :)>\\
[@namespace
boost
{
(:include decl pre_indent="4":)
}@]
0
- -39
+ -41
- 1
- 2
- [@namespace
boost
{
(:include api pre_indent="4":)
}@]
-
-
-
-
- 0
-
- -33
-
-
-
- 3
- 2
- `#include <(:link
- 1
-
- 0
-
- -27
-
-
- 2
- :)>
[@namespace
boost
{
(:include decl:)
}@]
+ 0
@@ -7189,71 +7189,71 @@
-19
- -20
-
-
- -21
-
-
- -22
-
-
- -23
-
-
- -24
-
-
- -25
-
-
- -26
-
-
- -27
-
-
- -28
-
-
- -29
-
-
- -30
-
-
- -31
-
-
- -32
-
-
- -36
+ -35-38
- -35
+ -39
- -41
+ -30
- -34
+ -25
- -40
+ -23-37
- -39
+ -36
+
+
+ -27
+
+
+ -29
+
+
+ -28
+
+
+ -34-33
+
+ -32
+
+
+ -31
+
+
+ -24
+
+
+ -21
+
+
+ -20
+
+
+ -40
+
+
+ -22
+
+
+ -26
+
+
+ -41
+
@@ -7273,7 +7273,7 @@
- -32
+ -19
@@ -7290,7 +7290,7 @@
- -21
+ -20
@@ -7307,7 +7307,7 @@
- -34
+ -22
@@ -7324,7 +7324,7 @@
- -40
+ -37
@@ -7348,7 +7348,7 @@
- -17
+ -32
@@ -7376,7 +7376,7 @@
- -11
+ -24
@@ -7408,7 +7408,7 @@
- -7
+ -16
@@ -7436,7 +7436,7 @@
- -9
+ -39
@@ -7464,7 +7464,7 @@
- -13
+ -8
@@ -7492,7 +7492,7 @@
- -18
+ -27
@@ -7520,7 +7520,7 @@
- -30
+ -26
@@ -7544,7 +7544,7 @@
- -22
+ -40
@@ -7568,7 +7568,7 @@
- -38
+ -30
@@ -7592,7 +7592,7 @@
- -35
+ -23
@@ -7620,7 +7620,7 @@
- -14
+ -5
@@ -7644,7 +7644,7 @@
- -12
+ -29
@@ -7668,7 +7668,7 @@
- -15
+ -34
@@ -7692,7 +7692,7 @@
- -16
+ -7
@@ -7716,7 +7716,7 @@
- -23
+ -33
@@ -7740,7 +7740,7 @@
- -26
+ -6
@@ -7768,7 +7768,7 @@
- -33
+ -21
@@ -7796,7 +7796,7 @@
- -29
+ -17
@@ -7824,7 +7824,7 @@
- -31
+ -25
@@ -7848,7 +7848,7 @@
- -8
+ -18
@@ -7872,7 +7872,7 @@
- -25
+ -11
@@ -7896,7 +7896,7 @@
- -28
+ -35
@@ -7920,7 +7920,7 @@
- -41
+ -13
@@ -7948,7 +7948,7 @@
- -20
+ -9
@@ -7976,7 +7976,7 @@
- -24
+ -14
@@ -8004,7 +8004,7 @@
- -37
+ -15
@@ -8032,7 +8032,7 @@
- -36
+ -10
@@ -8060,7 +8060,7 @@
- -10
+ -28
@@ -8084,7 +8084,7 @@
- -27
+ -36
@@ -8112,7 +8112,7 @@
- -39
+ -31
@@ -8140,7 +8140,7 @@
- -5
+ -12
@@ -8164,7 +8164,7 @@
- -6
+ -41
@@ -8188,7 +8188,7 @@
- -19
+ -38
@@ -8219,7 +8219,7 @@
-5
- error_info free function
+ diagnostic_information free function
@@ -8228,7 +8228,7 @@
-6
- noalso noindex tutorial
+
@@ -8237,7 +8237,7 @@
-7
- function
+ diagnostic_information tutorial
@@ -8246,7 +8246,7 @@
-8
-
+ exception_ptr free function
@@ -8255,7 +8255,7 @@
-9
- function
+ exception_ptr free function
@@ -8273,7 +8273,7 @@
-11
- type
+ noalso noindex tutorial
@@ -8282,7 +8282,7 @@
-12
-
+ error_info free function
@@ -8291,7 +8291,7 @@
-13
- exception_ptr free function
+ noalso noindex tutorial
@@ -8300,7 +8300,7 @@
-14
- diagnostic_information free function
+ type
@@ -8309,7 +8309,7 @@
-15
-
+ exception_ptr type
@@ -8318,7 +8318,7 @@
-16
- diagnostic_information tutorial
+ function
@@ -8327,7 +8327,7 @@
-17
-
+ error_info free function
@@ -8336,7 +8336,7 @@
-18
- error_info free function
+
@@ -8345,35 +8345,53 @@
-19
- noalso noindex tutorial
+ noindex0
- -20
+ -35
- exception_ptr free function
+ 0
- -21
-
-
- tutorial
-
-
-
- 0
-
- -22
+ -38noalso noindex tutorial
+
+
+ 0
+
+ -39
+
+
+ function
+
+
+
+ 0
+
+ -30
+
+
+
+
+
+
+ 0
+
+ -25
+
+
+ type
+ 0
@@ -8381,8 +8399,89 @@
-23
+ tutorial
+
+
+
+ 0
+
+ -37
+
+
+ index noindex
+
+
+
+ 0
+
+ -36
+
+
+
+
+
+
+ 0
+
+ -27
+
+
+ error_info free function
+
+
+
+ 0
+
+ -29
+
+
+
+
+
+
+ 0
+
+ -28
+
+
+ exception_ptr free function
+
+
+
+ 0
+
+ -34
+
+
+
+
+
+
+ 0
+
+ -33
+
+ error_info
+
+
+ 0
+
+ -32
+
+
+
+
+
+
+ 0
+
+ -31
+
+
+
+ 0
@@ -8396,115 +8495,16 @@
0
- -25
+ -21
- noalso noindex tutorial
+ free function0
- -26
-
-
-
-
-
-
- 0
-
- -27
-
-
-
-
-
-
- 0
-
- -28
-
-
-
-
-
-
- 0
-
- -29
-
-
- error_info free function
-
-
-
- 0
-
- -30
-
-
- error_info free function
-
-
-
- 0
-
- -31
-
-
- type
-
-
-
- 0
-
- -32
-
-
- noindex
-
-
-
- 0
-
- -36
-
-
- exception_ptr free function
-
-
-
- 0
-
- -38
-
-
-
-
-
-
- 0
-
- -35
-
-
- tutorial
-
-
-
- 0
-
- -41
-
-
- noalso noindex tutorial
-
-
-
- 0
-
- -34
+ -20tutorial
@@ -8516,34 +8516,34 @@
-40
- index noindex
+ noalso noindex tutorial0
- -37
+ -22
- exception_ptr type
+ tutorial0
- -39
+ -26
-
+ error_info free function0
- -33
+ -41
- free function
+ noalso noindex tutorial