exposition only 在 C++ 标准中究竟意味着什么?这是否意味着标记为exposition only 的私有(private)/ protected 成员必须按标准存在,或者它们只是实现的“建议”,根本不需要?
示例包括:
std::error_code::val_
std::wstring_convert::byte_err_string
std::array::elems
std::move_iterator::current
std::reverse_iterator::current
std::ostream_iterator::delim
// And a lot of others
最佳答案
这意味着它们不是标准所要求的,但它们只是说明类的内部结构可能是什么样的,以了解标准委员会所考虑的实现方式.
这基本上是一种传达意图的方式。
关于c++ - 仅在 C++ 标准中阐述?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34493104/