sbuild  1.5.3
sbuild-tr1types.h
Go to the documentation of this file.
00001 /* Copyright © 2005-2007  Roger Leigh <rleigh@debian.org>
00002  *
00003  * schroot is free software: you can redistribute it and/or modify it
00004  * under the terms of the GNU General Public License as published by
00005  * the Free Software Foundation, either version 3 of the License, or
00006  * (at your option) any later version.
00007  *
00008  * schroot is distributed in the hope that it will be useful, but
00009  * WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011  * General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program.  If not, see
00015  * <http://www.gnu.org/licenses/>.
00016  *
00017  *********************************************************************/
00018 
00027 #ifndef SBUILD_TR1TYPES_H
00028 # define SBUILD_TR1TYPES_H
00029 
00030 # include <sbuild/sbuild-config.h>
00031 
00032 # ifdef HAVE_MEMORY_SHARED_PTR
00033 #  include <memory>
00034 # elif HAVE_TR1_MEMORY
00035 # include <tr1/memory>
00036 namespace std {
00037     using std::tr1::shared_ptr;
00038     using std::tr1::weak_ptr;
00039     using std::tr1::static_pointer_cast;
00040     using std::tr1::const_pointer_cast;
00041     using std::tr1::dynamic_pointer_cast;
00042 }
00043 # elif HAVE_BOOST_SHARED_PTR_HPP
00044 #  include <boost/shared_ptr.hpp>
00045 namespace std {
00046     using boost::shared_ptr;
00047     using boost::weak_ptr;
00048     using boost::static_pointer_cast;
00049     using boost::const_pointer_cast;
00050     using boost::dynamic_pointer_cast;
00051 }
00052 # else
00053 #  error A shared_ptr implementation is not available
00054 # endif
00055 
00056 # ifdef HAVE_TUPLE
00057 #  include <tuple>
00058 # elif HAVE_TR1_TUPLE
00059 #  include <tr1/tuple>
00060 namespace std {
00061   using tr1::tuple;
00062   using tr1::get;
00063 }
00064 # elif HAVE_BOOST_TUPLE_TUPLE_HPP
00065 #  include <boost/tuple/tuple.hpp>
00066 namespace std {
00067   using boost::tuple;
00068   using boost::get;
00069 }
00070 # else
00071 #  error A tuple implementation is not available
00072 # endif
00073 
00074 #endif /* SBUILD_TR1TYPES_H */
00075 
00076 /*
00077  * Local Variables:
00078  * mode:C++
00079  * End:
00080  */