Make WvStreams compile with gcc 4.4.
[wvstreams.git] / include / wvtr1.h
blob35378431f0a2bc7524b1d457311b55cad9e9eb15
1 /* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
5 * Provide some aliases for TR1 stuff, with a fallback on Boost.
6 */
7 #ifndef __WVTR1_H
8 #define __WVTR1_H
10 #include "wvautoconf.h"
12 #if defined(HAVE_TR1_FUNCTIONAL)
14 #include <tr1/functional>
15 #include <tr1/memory>
17 namespace wv
19 using std::tr1::bind;
20 using std::tr1::cref;
21 using std::tr1::function;
22 using std::tr1::ref;
23 using std::tr1::shared_ptr;
26 namespace {
27 using namespace std::tr1::placeholders;
30 #elif defined(HAVE_BOOST_FUNCTION_HPP)
32 #include <boost/bind.hpp>
33 #include <boost/function.hpp>
34 #include <boost/shared_ptr.hpp>
36 namespace wv
38 using boost::bind;
39 using boost::cref;
40 using boost::function;
41 using boost::ref;
42 using boost::shared_ptr;
45 #else /* We have neither TR1 or Boost, punt. */
46 #error "One of TR1 or Boost is required to use WvStreams"
47 #endif
49 #endif /* __WVTR1_H */