Suppress unused variable warning in C++ => Compiler bug or code bug?

后端 未结 5 1101
無奈伤痛
無奈伤痛 2021-01-04 10:04

Presently, I am using the following function template to suppress unused variable warnings:

template
void
unused(T const &) {
  /* Do n         


        
5条回答
  •  一生所求
    2021-01-04 10:58

    It is a compiler bug and there are no known work arounds:

    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42655

    It is fixed in v4.4.

提交回复
热议问题