Closed andrea-iob closed 2 years ago
The [] operator of std::vector returns a temporary object of a proxy type called std::vector::reference, rather than an actual bool&.
Although the libstdc++ defines an overload for swapping this type of proxy objects, this is just an extension to the standard.
Without this change bitpit doesn't compile with gcc 12.
I've added a comment.
The [] operator of std::vector returns a temporary object of a proxy type called std::vector::reference, rather than an actual bool&.
Although the libstdc++ defines an overload for swapping this type of proxy objects, this is just an extension to the standard.
Without this change bitpit doesn't compile with gcc 12.