私は次のようなコードを持っています
std::vector<std::unique_ptr<int>> v;
std::unique_ptr<int> a(new int(0));
std::unique_ptr<int>& b = a;
v.insert(v.begin(), std::move(b)); //ok
ただし、3番目のステートメントにconstを追加すると
const std::unique_ptr<int>& b = a;
v.insert(v.begin(), std::move(b)); //Compiler error, cannot access ptr private member
constをnon-constに変換できない以外に、コンパイラが一意のポインタのプライベートメンバーにアクセスできないことを示すのはなぜですか?ありがとう。