DER: In visitor code, use ndnboost::any. We can use ndnboost::any because this is an internal header and will not conflict with the application if it uses boost::any.
diff --git a/ndn-cpp/encoding/der/visitor/simple-visitor.cpp b/ndn-cpp/encoding/der/visitor/simple-visitor.cpp
index 5845e22..7007505 100644
--- a/ndn-cpp/encoding/der/visitor/simple-visitor.cpp
+++ b/ndn-cpp/encoding/der/visitor/simple-visitor.cpp
@@ -17,7 +17,7 @@
namespace der
{
-Any
+ndnboost::any
SimpleVisitor::visit(DerBool& derBool)
{
bool result = true;
@@ -25,41 +25,41 @@
if(0 == derBool.getPayload()[0])
result = false;
- return Any(result);
+ return ndnboost::any(result);
}
-Any
+ndnboost::any
SimpleVisitor::visit(DerInteger& derInteger)
{
- return Any(derInteger.getPayload());
+ return ndnboost::any(derInteger.getPayload());
}
-Any
+ndnboost::any
SimpleVisitor::visit(DerPrintableString& derPStr)
{
- return Any(string((const char*)&derPStr.getPayload()[0], derPStr.getPayload().size()));
+ return ndnboost::any(string((const char*)&derPStr.getPayload()[0], derPStr.getPayload().size()));
}
-Any
+ndnboost::any
SimpleVisitor::visit(DerBitString& derBStr)
{
- return Any(derBStr.getPayload());
+ return ndnboost::any(derBStr.getPayload());
}
-Any
+ndnboost::any
SimpleVisitor::visit(DerNull& derNull)
{
- return Any();
+ return ndnboost::any();
}
-Any
+ndnboost::any
SimpleVisitor::visit(DerOctetString& derOStr)
{
vector<uint8_t> result(derOStr.getPayload());
- return Any(result);
+ return ndnboost::any(result);
}
-Any
+ndnboost::any
SimpleVisitor::visit(DerOid& derOid)
{
vector<int> intList;
@@ -78,21 +78,21 @@
intList.push_back(derOid.decode128(offset));
}
- return Any(OID(intList));
+ return ndnboost::any(OID(intList));
}
-Any
+ndnboost::any
SimpleVisitor::visit(DerSequence& derSeq)
{
- return Any();
+ return ndnboost::any();
}
#if 0 // TODO: Implmenent alternative to boost::posix_time::from_iso_string.
-Any
+ndnboost::any
SimpleVisitor::visit(DerGtime& derGtime)
{
string str((const char*)&derGtime.getPayload()[0], derGtime.getPayload().size());
- return Any(boost::posix_time::from_iso_string(str.substr(0, 8) + "T" + str.substr(8, 6)));
+ return ndnboost::any(boost::posix_time::from_iso_string(str.substr(0, 8) + "T" + str.substr(8, 6)));
}
#endif