WvStreams
wvtr1.h
1 /* -*- Mode: C++ -*-
2  * Worldvisions Weaver Software:
3  * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4  *
5  * Provide some aliases for TR1 stuff, with a fallback on Boost.
6  */
7 #ifndef __WVTR1_H
8 #define __WVTR1_H
9 
10 #include "wvautoconf.h"
11 
12 #if defined(HAVE_TR1_FUNCTIONAL)
13 
14 #include <tr1/functional>
15 #include <tr1/memory>
16 
17 namespace wv
18 {
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;
24 }
25 
26 namespace {
27  using namespace std::tr1::placeholders;
28 }
29 
30 #elif defined(HAVE_BOOST_FUNCTION_HPP)
31 
32 #include <boost/bind.hpp>
33 #include <boost/function.hpp>
34 #include <boost/shared_ptr.hpp>
35 
36 namespace wv
37 {
38  using boost::bind;
39  using boost::cref;
40  using boost::function;
41  using boost::ref;
42  using boost::shared_ptr;
43 }
44 
45 #else /* We have neither TR1 or Boost, punt. */
46 #error "One of TR1 or Boost is required to use WvStreams"
47 #endif
48 
49 #endif /* __WVTR1_H */