J
juraj
I'm trying to pass a member of a vector<bool> to my function by reference.
G++ complains:
invalid initialization of non-const reference of type 'bool&' from a
temporary of type 'std::_Bit_reference'
How to do it? The only way I managed to do it is to template a function
which takes pointers, however, the compiler issues a suspicious warning
"taking address of temporary...". Is there a cleaner way to do it?
TIA
G++ complains:
invalid initialization of non-const reference of type 'bool&' from a
temporary of type 'std::_Bit_reference'
How to do it? The only way I managed to do it is to template a function
which takes pointers, however, the compiler issues a suspicious warning
"taking address of temporary...". Is there a cleaner way to do it?
TIA