In common.h, define namespace ptr_lib = boost, and use ptr_lib::shared_ptr<Name>, etc.
diff --git a/ndn-cpp/common.h b/ndn-cpp/common.h
index a9c078b..b517c1b 100644
--- a/ndn-cpp/common.h
+++ b/ndn-cpp/common.h
@@ -19,6 +19,7 @@
namespace ndn
{
+namespace ptr_lib = boost;
typedef boost::posix_time::ptime Time;
typedef boost::posix_time::time_duration TimeInterval;
@@ -66,9 +67,6 @@
typedef std::vector<unsigned char> Bytes;
typedef std::vector<std::string>Comps;
-typedef boost::shared_ptr<Bytes> BytesPtr;
-typedef boost::shared_ptr<const Bytes> ConstBytesPtr;
-
inline
const unsigned char *
head(const Bytes &bytes)
@@ -94,18 +92,18 @@
}
}
-inline BytesPtr
+inline ptr_lib::shared_ptr<Bytes>
readRawPtr (const unsigned char *src, size_t len)
{
if (len > 0)
{
- BytesPtr ret (new Bytes (len));
+ ptr_lib::shared_ptr<Bytes> ret (new Bytes (len));
memcpy (head (*ret), src, len);
return ret;
}
else
- return BytesPtr ();
+ return ptr_lib::shared_ptr<Bytes> ();
}
} // ndn
#endif // NDN_COMMON_H