How to define a pointer pointing to a constexpr variable?
问题 In C++ Primer 5th, it says that constexpr imposes a top-level const on the objects it defines. So how I can I declare a pointer with a constexpr specifier imposing a low-level const, i.e. a pointer pointing to a constexpr object? 回答1: A constexpr object is an object just like any other. The fact that its value is computed at compile time does not alter this. Often, the compiler will seek to avoid actually emitting code to create const values and objects if it knows that they will never be