aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-09-30 16:35:51 +0200
committerMartin Braun <martin.braun@ettus.com>2019-09-30 16:35:51 +0200
commitd8b75ca5324204bfb3d7cdb1a03831d9ecd97e73 (patch)
tree356de930d47ce54833566a87ce826551c5ee3e61 /host/include
parentabedbfe5481650a3f5200ab2ba48f6668096761e (diff)
downloaduhd-d8b75ca5324204bfb3d7cdb1a03831d9ecd97e73.tar.gz
uhd-d8b75ca5324204bfb3d7cdb1a03831d9ecd97e73.tar.bz2
uhd-d8b75ca5324204bfb3d7cdb1a03831d9ecd97e73.zip
Revert "uhd: Check property type at access; error if mismatch"
This reverts commit 94592641f0647563bc4d2163805d5284a6796273. The commit itself was OK, but it changed the requirements such that UHD could only be compiled with C++11.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/property_tree.hpp8
-rw-r--r--host/include/uhd/property_tree.ipp7
2 files changed, 3 insertions, 12 deletions
diff --git a/host/include/uhd/property_tree.hpp b/host/include/uhd/property_tree.hpp
index d97a5505e..11b92393a 100644
--- a/host/include/uhd/property_tree.hpp
+++ b/host/include/uhd/property_tree.hpp
@@ -14,7 +14,6 @@
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
-#include <typeindex>
#include <vector>
namespace uhd {
@@ -253,15 +252,10 @@ private:
virtual boost::shared_ptr<void> _pop(const fs_path& path) = 0;
//! Internal create property with wild-card type
- virtual void _create(const fs_path& path, const boost::shared_ptr<void>& prop,
- std::type_index prop_type) = 0;
+ virtual void _create(const fs_path& path, const boost::shared_ptr<void>& prop) = 0;
//! Internal access property with wild-card type
virtual boost::shared_ptr<void>& _access(const fs_path& path) const = 0;
-
- //! Internal access property with wild-card type but with type verification
- virtual boost::shared_ptr<void>& _access_with_type_check(
- const fs_path& path, std::type_index expected_prop_type) const = 0;
};
} // namespace uhd
diff --git a/host/include/uhd/property_tree.ipp b/host/include/uhd/property_tree.ipp
index 20ad43fb1..ca5d6904f 100644
--- a/host/include/uhd/property_tree.ipp
+++ b/host/include/uhd/property_tree.ipp
@@ -12,7 +12,6 @@
#include <uhd/exception.hpp>
#include <boost/foreach.hpp>
#include <boost/scoped_ptr.hpp>
-#include <typeindex>
#include <vector>
/***********************************************************************
@@ -183,16 +182,14 @@ template <typename T>
property<T>& property_tree::create(const fs_path& path, coerce_mode_t coerce_mode)
{
this->_create(path,
- typename boost::shared_ptr<property<T> >(new property_impl<T>(coerce_mode)),
- std::type_index(typeid(T)));
+ typename boost::shared_ptr<property<T> >(new property_impl<T>(coerce_mode)));
return this->access<T>(path);
}
template <typename T>
property<T>& property_tree::access(const fs_path& path)
{
- return *boost::static_pointer_cast<property<T> >(
- this->_access_with_type_check(path, std::type_index(typeid(T))));
+ return *boost::static_pointer_cast<property<T> >(this->_access(path));
}
template <typename T>