graph_analysis
SharedPtr.hpp
Go to the documentation of this file.
1 #ifndef GRAPH_ANALYSIS_SHARED_PTR_HPP
2 #define GRAPH_ANALYSIS_SHARED_PTR_HPP
3 
4 #if __cplusplus <= 199711L
5 #define USE_BOOST_SHARED_PTR
6 #endif
7 
8 #ifdef USE_BOOST_SHARED_PTR
9 #include <boost/enable_shared_from_this.hpp>
10 #include <boost/shared_ptr.hpp>
11 #include <boost/weak_ptr.hpp>
12 #include <boost/function.hpp>
13 #include <boost/make_shared.hpp>
14 #else
15 #include <memory>
16 #include <functional>
17 #endif
18 
19 namespace graph_analysis
20 {
21 #ifdef USE_BOOST_SHARED_PTR
22  using ::boost::shared_ptr;
23  using ::boost::weak_ptr;
24  using ::boost::enable_shared_from_this;
25  using ::boost::make_shared;
26  using ::boost::dynamic_pointer_cast;
27  using ::boost::static_pointer_cast;
28  using ::boost::const_pointer_cast;
29  using ::boost::function1;
30  using ::boost::bind;
31 #else
32  using ::std::shared_ptr;
33  using ::std::weak_ptr;
34  using ::std::make_shared;
35  using ::std::dynamic_pointer_cast;
36  using ::std::static_pointer_cast;
37  using ::std::const_pointer_cast;
38  using ::std::function;
39  using ::std::bind;
40  template <class T, class U>
41  using function1 = ::std::function<T(U)>;
42  using ::std::enable_shared_from_this;
43 #endif
44 }
45 
46 #endif // GRAPH_ANALYSIS_SHARED_PTR_HPP
Main namespace of the graph analysis library.
Definition: BFS.cpp:3