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 }
43 # elif HAVE_BOOST_SHARED_PTR_HPP
44 # include <boost/shared_ptr.hpp>
45 namespace std {
46  using boost::shared_ptr;
47  using boost::weak_ptr;
48  using boost::static_pointer_cast;
49  using boost::const_pointer_cast;
50  using boost::dynamic_pointer_cast;
51 }
52 # else
53 # error A shared_ptr implementation is not available
54 # endif
55 
56 # ifdef HAVE_TUPLE
57 # include <tuple>
58 # elif HAVE_TR1_TUPLE
59 # include <tr1/tuple>
60 namespace std {
61  using tr1::tuple;
62  using tr1::get;
63 }
64 # elif HAVE_BOOST_TUPLE_TUPLE_HPP
65 # include <boost/tuple/tuple.hpp>
66 namespace std {
67  using boost::tuple;
68  using boost::get;
69 }
70 # else
71 # error A tuple implementation is not available
72 # endif
73 
74 #endif /* SBUILD_TR1TYPES_H */
75 
76 /*
77  * Local Variables:
78  * mode:C++
79  * End:
80  */
STL namespace.