Introducing std::make_unique self undefined behavior, period. There is no safe way to do this. In addition, it is also impractical - the advantage that you get is small, and the cost of maintaining and understanding the code is high.
The more likely it is, your make_unique will not match what will be published exactly, so your code will have a weird version dependency.
A better plan is to define your own make_unique elsewhere in your own namespace. If C ++ 1y is active, you can use using std::make_unique import it instead of your own make_unique .
It is compatible with your code standards. It should also be clear to users of utility::make_unique that it is not guaranteed to be identical to C ++ 1y make_unique .
It also allows you to identify the std::make_unique detection problem until it is standardized, and then decide whether it matches the interface you completed.
source share