SongPart mtm::SongStructure::getPart(int index) const {
assert(index >= 0 && index < num_of_parts);
return song_parts[index];
}
const SongPart& mtm::Song::operator[](int index) const {
assert(index >= 0 && index < song_length);
return (song_format->getPart(index));
}
2 番目の関数の戻り値からこの警告が表示されます。
一時的な参照を返す [デフォルトで有効]
これを修正する方法は?そして、各関数の戻り値を変更することはできません!