new-expression Questions
1
Solved
We know that void* holds no information regarding the actual type of the data it points to. However, from cppreference on new and new[] we know that those operators return void*. How come, th...
Telamon asked 28/12, 2019 at 17:51
2
In C++14 given the following code:
void foo() {
double d = 5.0;
auto p1 = new int[d];
}
clang compiles this without diagnostic while gcc on the other hand produces the following diagnostic (se...
Ref asked 12/12, 2018 at 14:25
1
I would like to know if expressions of the form new super.SomeProperty are valid in JavaScript.
This question arose while working with code that behaves inconsistently across browsers like the exa...
Eviscerate asked 11/5, 2018 at 9:6
1
Solved
Basically, why is this valid:
auto p1 = new int[10]{5};
but this is not:
auto p1 = new int[10](5);
And more generally what are the rules for the new-expression initializer?
I found the followi...
Madaras asked 5/4, 2018 at 3:24
1
© 2022 - 2024 — McMap. All rights reserved.