Determining if pointer-to-const points to const object?

前端 未结 0 2016
庸人自扰
庸人自扰 2021-01-03 23:21

Is there anyway to determine if a pointer-to-const points to a const object?

ie

bool is_const_object(const int* p) {
    return ???;
}

int main() {
           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题