]> git.lyx.org Git - features.git/blob - boost/boost/exception/detail/counted_base.hpp
75f6375d2d811ded04b338b1efd1292357bca31d
[features.git] / boost / boost / exception / detail / counted_base.hpp
1 //Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.
2
3 //Distributed under the Boost Software License, Version 1.0. (See accompanying
4 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6 #ifndef UUID_DBA0D90C930911DCBA7B675A56D89593
7 #define UUID_DBA0D90C930911DCBA7B675A56D89593
8
9 #include <boost/detail/workaround.hpp>
10
11 namespace
12 boost
13     {
14     namespace
15     exception_detail
16         {
17         class
18         counted_base
19             {
20             friend
21             void
22             intrusive_ptr_add_ref( counted_base const * c )
23                 {
24                 c->add_ref();
25                 }
26
27             friend
28             void
29             intrusive_ptr_release( counted_base const * c )
30                 {
31                 c->release();
32                 }
33
34             virtual void add_ref() const=0;
35             virtual void release() const=0;
36
37             protected:
38
39 #if BOOST_WORKAROUND( __GNUC__, BOOST_TESTED_AT(4) )
40 virtual //Disable bogus GCC warning.
41 #endif
42             ~counted_base() throw()
43                 {
44                 }
45             };
46         }
47     }
48
49 #endif