¡@

Home 

c++ Programming Glossary: make_unique_num_args

Is there a way to write make_unique() in VS2012?

http://stackoverflow.com/questions/12547983/is-there-a-way-to-write-make-unique-in-vs2012

#include utility #include boost preprocessor.hpp #ifndef MAKE_UNIQUE_NUM_ARGS allow this to be changed to a higher number if needed ten is.. number if needed ten is a good default number #define MAKE_UNIQUE_NUM_ARGS 10 #endif #if MAKE_UNIQUE_NUM_ARGS 0 but don't be stupid with.. default number #define MAKE_UNIQUE_NUM_ARGS 10 #endif #if MAKE_UNIQUE_NUM_ARGS 0 but don't be stupid with it #error Invalid MAKE_UNIQUE_NUM_ARGS..