首页
Python
Java
前端
数据库
Linux
Chatgpt专题
开发者工具箱
恼火专题
C++备忘录080:C/C++中最让人恼火的特性
隐式类型转换 #include <iostream>#include <variant>#include <string>int main() {auto const v = std::variant<bool, std::string>{"hello"}; std::cout << v.index() << '\n'; // prints 0} 因为"hello"是char cons
阅读更多...