source: trunk/debathena/third/schroot/sbuild/sbuild-tr1types.h @ 24167

Revision 24167, 1.7 KB checked in by broder, 15 years ago (diff)
Import schroot upstream into subversion.
Line 
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
19/**
20 * @file sbuild-tr1types.h TR1 type substitution.  This header
21 * substitutes Boost types as TR1 types when the Standard Library does
22 * not support TR1.
23 */
24
25#ifndef SBUILD_TR1TYPES_H
26#define SBUILD_TR1TYPES_H
27
28#include <sbuild/sbuild-config.h>
29
30#ifdef HAVE_TR1_MEMORY
31#include <tr1/memory>
32#elif HAVE_BOOST_SHARED_PTR_HPP
33#include <boost/shared_ptr.hpp>
34namespace std {
35  namespace tr1 {
36    using boost::shared_ptr;
37    using boost::static_pointer_cast;
38    using boost::const_pointer_cast;
39    using boost::dynamic_pointer_cast;
40  }
41}
42#else
43#error A shared_ptr implementation is not available
44#endif
45
46#ifdef HAVE_TR1_TUPLE
47#include <tr1/tuple>
48#elif HAVE_BOOST_TUPLE_TUPLE_HPP
49#include <boost/tuple/tuple.hpp>
50namespace std { namespace tr1 { using boost::tuple; using boost::get; } }
51#else
52#error A tuple implementation is not available
53#endif
54
55#endif /* SBUILD_TR1TYPES_H */
56
57/*
58 * Local Variables:
59 * mode:C++
60 * End:
61 */
Note: See TracBrowser for help on using the repository browser.