Jeff Thompson | 47eecfc | 2013-07-07 22:56:46 -0700 | [diff] [blame] | 1 | /** |
| 2 | * @author: Jeff Thompson |
| 3 | * See COPYING for copyright and distribution information. |
Jeff Thompson | 571f352 | 2013-07-07 22:39:31 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef NDN_COMMON_HPP |
| 7 | #define NDN_COMMON_HPP |
| 8 | |
| 9 | #include "../config.h" |
| 10 | |
| 11 | // Depending on where ./configure found shared_ptr, define the ptr_lib namespace. |
| 12 | // We always use ndn::ptr_lib::shared_ptr. |
| 13 | #if HAVE_STD_SHARED_PTR |
| 14 | #include <memory> |
| 15 | namespace ndn { namespace ptr_lib = std; } |
| 16 | #elif HAVE_BOOST_SHARED_PTR |
| 17 | #include <boost/shared_ptr.hpp> |
| 18 | #include <boost/make_shared.hpp> |
| 19 | namespace ndn { namespace ptr_lib = boost; } |
| 20 | #else |
| 21 | #error "Can't find shared_ptr in std or boost" |
| 22 | #endif |
| 23 | |
| 24 | #endif |