I am porting my project to C ++ 11, and I try to use as much of the standard library as possible.
Before completing the migration, I need a quick way to flip between boost and the STL implementation of shared_ptr (to run tests, unit tests, etc.).
So, I defined an alias for shared_ptr as follows:
#ifdef _USE_BOOST_ template <class C> using shared_ptr = boost::shared_ptr<C> #else template <class C> using shared_ptr = std::shared_ptr<C> #endif
now i need to do the same for make_shared ... But how? Macro? Wrapper? I donβt really like it. What are the alternatives?
user1773602
source share