नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
a brace-enclosed initializer list cannot be used in a new-expression whose type contains 'auto/decltype(auto)'
Remarks
If an auto type-specifier appears in the specifier sequence of a new type-identifier or the type-identifier of a new expression, the expression must contain an initializer of the form ( assignment-expression ). The compiler deduces the type-identifier from the assignment-expression in the initializer. For example,
new auto(42); // new allocates int
auto c = new auto('a'); // c is of type char*, new allocates char
new (auto*)(static_cast<short*>(nullptr)); // allocates type short*
To resolve this issue, use parentheses to enclose the initialization value of the new expression.