python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Is it possible to do an aligned alllocation in a constexpr context?
I have some code that requires a vector to be SIMD aligned and I'm using an aligned allocator from a library as an allocator to implement that, but this allocator has no constexpr support. Would it be...
Andreas Loanjoe
Votes: 0
Answers: 0
New-expression with consteval constructor in constexpr context
struct A {
consteval A() {};
};
constexpr bool g() {
auto a = new A;
delete a;
return true;
}
int main() {
static_assert(g());
}
https://godbolt.org/z/jsq35WxKs
GCC and M...
user17732522
Votes: 0
Answers: 1
Ternary operator works with constexpr expressions but `if constexpr` does
I am playing around in C++17 with clang version 13.0.0 to test whether a given constexpr value is NaN with wrappers but I keep getting errors with if constexpr but the compiler passes using ternary op...

Kish
Votes: 0
Answers: 0
static constexpr vs constexpr in function body?
Is there any difference between static constexpr and constexpr when used inside a function's body?
int SomeClass::get(const bool b)
{
static constexpr int SOME_CONSTANT = 3;
constexpr int SOM...

Caglayan DOKME
Votes: 0
Answers: 1