std::nothrow 未按预期工作 - 条件始终为 false

std::nothrow doesnt work as expected - Condition is always false

#include <iostream>


int main() {


    int *xx = new (std::nothrow) int[2];

    if(xx == NULL)
    {
        exit(1);
    }

    return 0;
}

我正在尝试使用 nothrow,但 clion 说 xx == NULL 是 "Condition is always false",exit(1) 是 "Unreachable code"。我哪里错了?

这是 CLion 中的错误 - CPP-989