相关疑难解决方法(0)

Constexpr与宏

我应该在哪里使用宏,哪里更喜欢constexpr?它们基本不一样吗?

#define MAX_HEIGHT 720
Run Code Online (Sandbox Code Playgroud)

VS

constexpr unsigned int max_height = 720;
Run Code Online (Sandbox Code Playgroud)

c++ macros constexpr c++11

54
推荐指数
3
解决办法
2万
查看次数

标签 统计

c++ ×1

c++11 ×1

constexpr ×1

macros ×1