Commit 993809ef authored by Tom Niget's avatar Tom Niget

Fix PyObj impl ctor

parent f3ea36ef
......@@ -66,7 +66,7 @@ class PyObj : public std::shared_ptr<typename RealType<T>::type> {
public:
using inner = typename RealType<T>::type;
/*PyObj() : std::shared_ptr<inner>() {}
PyObj() : std::shared_ptr<inner>() {}
PyObj(std::nullptr_t) : std::shared_ptr<inner>(nullptr) {}
PyObj(inner *ptr) : std::shared_ptr<inner>(ptr) {}
PyObj(const std::shared_ptr<inner> &ptr) : std::shared_ptr<inner>(ptr) {}
......@@ -83,14 +83,17 @@ public:
PyObj(const PyObj<U> &ptr) : std::shared_ptr<inner>(ptr) {}
template<typename U>
PyObj(PyObj<U> &&ptr) : std::shared_ptr<inner>(ptr) {}*/
PyObj(PyObj<U> &&ptr) : std::shared_ptr<inner>(ptr) {}
template<typename... Args>
PyObj(Args&&... args) : std::shared_ptr<inner>(std::forward<Args>(args)...) {}
// using make_shared
template<class U>
PyObj(const U& other) : std::shared_ptr<inner>(std::make_shared<T>(other)) {}
PyObj(U&& other) : std::shared_ptr<inner>(std::make_shared<inner>(other)) {}
/*template<typename... Args>
PyObj(Args&&... args) : std::shared_ptr<inner>(std::forward<Args>(args)...) {}*/
template<class U>
bool operator==(const PyObj<U> &other) const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment