how to check if function exists
c++, c++11, macros, templates
Solution
Your best bet is to use the standard `__cplusplus` macro which, for C++11, is `201103L`. For C++14 onwards it will be a different value to this.
Problem
I want to implement my own `std::make_unique` function with the function being part of std namespace. I know this helper function is added to C++14 but I do not have it in C++11. So, I want to check it with some C++11 template magic (couldn't find any options with macros) to check if a function exists inside the `std` namespace and if it doesn't define it on my own. Is that possible? I don't even know where to start.