杀鸡焉用牛刀 发表于 2024-1-20 02:28:28

C++20语言核心特性的变化

using for Enumeration Values

  对比一下C++20前后的区别:
enum class State {    open,    progress,    done = 9};// Before C++20void print(State s) {    switch (s) {      case State::open:            std::cout
页: [1]
查看完整版本: C++20语言核心特性的变化