I have a code:
namespace My
{
#define sptr std::shared_ptr;
}
It was used in a lot of places. Now I’ve included this code as library into qt project and it failed to load because somewhere it uses sptr as variable name.
I can modify Qt header and rename variable but this isn’t good in portability side. What is the best way to solve this problem? typedef can’t be used with templates. I know hack with templated structure but I still have to modify my code with it.
See also @Kerrek SB’s comment to the question regarding this specific use-case.