sbuild  1.6.10
sbuild-tr1types.h
Go to the documentation of this file.
1 /* Copyright © 2005-2007 Roger Leigh <rleigh@debian.org>
2  *
3  * schroot is free software: you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * (at your option) any later version.
7  *
8  * schroot is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see
15  * <http://www.gnu.org/licenses/>.
16  *
17  *********************************************************************/
18 
27 #ifndef SBUILD_TR1TYPES_H
28 # define SBUILD_TR1TYPES_H
29 
30 # include <sbuild/sbuild-config.h>
31 
32 # ifdef HAVE_MEMORY_SHARED_PTR
33 # include <memory>
34 # elif HAVE_TR1_MEMORY
35 # include <tr1/memory>
36 namespace std {
37  using std::tr1::shared_ptr;
38  using std::tr1::weak_ptr;
39  using std::tr1::static_pointer_cast;
40  using std::tr1::const_pointer_cast;
41  using std::tr1::dynamic_pointer_cast;
42  using std::tr1::enable_shared_from_this;
43 }
44 # elif HAVE_BOOST_SHARED_PTR_HPP
45 # include <boost/shared_ptr.hpp>
46 namespace std {
47  using boost::shared_ptr;
48  using boost::weak_ptr;
49  using boost::static_pointer_cast;
50  using boost::const_pointer_cast;
51  using boost::dynamic_pointer_cast;
52  using boost::enable_shared_from_this;
53 }
54 # else
55 # error A shared_ptr implementation is not available
56 # endif
57 
58 # ifdef HAVE_TUPLE
59 # include <tuple>
60 # elif HAVE_TR1_TUPLE
61 # include <tr1/tuple>
62 namespace std {
63  using tr1::tuple;
64  using tr1::get;
65 }
66 # elif HAVE_BOOST_TUPLE_TUPLE_HPP
67 # include <boost/tuple/tuple.hpp>
68 namespace std {
69  using boost::tuple;
70  using boost::get;
71 }
72 # else
73 # error A tuple implementation is not available
74 # endif
75 
76 #endif /* SBUILD_TR1TYPES_H */
77 
78 /*
79  * Local Variables:
80  * mode:C++
81  * End:
82  */
STL namespace.