diff --git a/src/pcsc.hxx b/src/pcsc.hxx index d00bf5a..154f901 100644 --- a/src/pcsc.hxx +++ b/src/pcsc.hxx @@ -73,13 +73,18 @@ } #endif -#ifdef NO_CXX2011 -#warning Old compiler (pre 2011): using boost as replacement for std +#if __cplusplus > 199711L + namespace pcsc { + template struct shared_ptr { + typedef std::shared_ptr t; + }; + } +#else + #warning Old compiler (pre 2011): using boost as replacement for std #include - namespace std { - template class shared_ptr: public boost::shared_ptr { - public: - shared_ptr(T* p): boost::shared_ptr(p) {} + namespace pcsc { + template struct shared_ptr { + typedef boost::shared_ptr t; }; } #endif @@ -532,7 +537,7 @@ namespace pcsc { if (_reader.find(name)==_reader.end()) _reader.insert (std::make_pair - (name, std::shared_ptr(new Reader(name, *this)))); + (name, shared_ptr::t(new Reader(name, *this)))); return *_reader.find(name)->second; } @@ -841,7 +846,7 @@ namespace pcsc { bool _exc; SCARDCONTEXT _id; long _state; - std::map > _reader; + std::map::t > _reader; };