Description
Since gcc 11 the compiler detects this problem and aborts the compilation:
src/library/generator.transpose.cpp: In function 'clfftStatus clfft_transpose_generator::genSwapKernelGeneral(const Signature&, std::string&, std::string&, const size_t&, size_t)':
src/library/generator.transpose.cpp:1092:95: error: taking address of rvalue [-fpermissive]
1092 | std::string smaller_dim_str = static_caststd::ostringstream*(&(std::ostringstream() << smaller_dim))->str();
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
src/library/generator.transpose.cpp:1093:93: error: taking address of rvalue [-fpermissive]
1093 | std::string dim_ratio_str = static_caststd::ostringstream*(&(std::ostringstream() << dim_ratio))->str();
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
It seems to me that the compiler is right in this case and the code indeed tries to get an address of a temporary object, which is not allowed in C++.