how to define a good/perfect New function to init any class/struct in C++?
问题 struct object { void Name() {} }; struct ABC:object { //Note:did not declare any constructor and base class is object std::byte a; const std::string* b; int c; } struct BCD { //Note:did not declare any constructor and none base class std::byte a; const std::string* b; int c; } i want the New function accept: New<ABC>({12,"first",123}); New<ABC>(a,b,c); New<BCD>({12,"first",123}); New<BCD>(a,b,c); this is my New function define: template <class _Ty, class... _Types, std::enable_if_t<!std::is