I am rather confused with structural binding. Even if I use const and by-value (without &) structural binding as in this example:
#include <iostream>
#include <tuple>
int main()
{
int x = 0;
std::tuple<int&> p(x);
const auto [a] = p;
a++;
std::cout << x << '\n';
}
It still modifies x and prints 1: https://gcc.godbolt.org/z/jc8hxE8M6
Could you please explain why it works that way and want changes if I add & before [a] or remove const?