summaryrefslogtreecommitdiff
path: root/include/gnuradio/element.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/gnuradio/element.hpp')
-rw-r--r--include/gnuradio/element.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/gnuradio/element.hpp b/include/gnuradio/element.hpp
index 15acbd7..dc153fe 100644
--- a/include/gnuradio/element.hpp
+++ b/include/gnuradio/element.hpp
@@ -33,7 +33,10 @@ struct GR_RUNTIME_API Element : boost::shared_ptr<ElementImpl>
* Create an element from a shared pointer to an element.
* Good for that factory function/shared ptr paradigm.
*/
- Element(const boost::shared_ptr<Element> &elem);
+ template <typename T>
+ Element(const boost::shared_ptr<T> &elem):
+ boost::shared_ptr<ElementImpl>(*reinterpret_cast<const Element*>(elem.get()))
+ { }
};