Šimon Tóth’s Post

View profile for Šimon Tóth

C++ Educational Content Creator | 20 years of Software Engineering experience distilled into digestible daily posts

The std::to_underlying is a C++23 single-purpose cast that converts an enumerator to the underlying integral type of the enumeration. This single-step approach replaces the previous approach using static_cast in combination with the C++11 std::underlying_type utility. The std::underlying_type utility is required since the underlying type of unscoped enumerations is implementation-defined. Compiler Explorer link: https://lnkd.in/eieQ6Tqp #cpp #cplusplus #coding #programming #dailybiteofcpp

  • text
See more comments

To view or add a comment, sign in

Explore content categories