a const reference cant use the const member reference
struct A{
void f(){
}
void f() const{
}
};
struct B{
B (A& a) : a(a) {}
void f1(){
a.f();
}
void f1() const{
a.f();
}
A &a;
};
int main(int argc, char *argv[])
{
A a;
B b(a);
// b.a = &a;
b.f1();
const B& d = b;
d.f1();
return 0;
}