[[maybe_unused]] with structured_binding?
[[maybe_unused]] with structured_binding?
: warning: unused variable ‘_y’ [-Wunused-variable]
[[maybe_unused]] const auto [x, _y] = f();
如何防止此处的警告? 在这种情况下,[[maybe_unused]]
似乎不起作用?
正如评论所建议的,-Wunused-variable
只出现在 gcc7 中
较新的 gcc 不需要[[maybe_unused]]
相关文章:
- 使用 [] 运算符时"binding reference of type discards qualifiers"
- 在node-gip binding.gyp文件中,如何根据系统结构(32位、64位)包含不同的库文件
- protobuf in C++ with dynamic binding for google::protobuf::M
- binding.gyp:如何使用"copies"部分在多个位置复制文件
- "structured bindings"与"decomposition declarations"
- Binding C++ and Fortran
- 在Visual Studio 2017中使用c ++ 17 'structured bindings'功能
- SQLite Binding Numaric 数据类型
- Javascript C++ binding?
- Binding to a weak_ptr
- Reg Sqlite binding
- C++错误:"Using obsolete binding"
- c++/MATLAB Mex binding
- CMFCPropertyGridProperty and CCombobox binding
- 在构建Node.js/Node-webkit插件时,通过binding.gyp将.cpp文件编译为Objective-C
- 关于"structural binding"的提案在哪里?
- “VkVertexInputBindingDescription”中的“binding”的目的是什么
- Cocos2d-x lua binding
- Binding to OpenGL 3.x VBO
- constexpr 是编译器的"hint"(如内联)还是"a binding request"?