引用类型可以用作 STL 映射中的键类型吗
Can I construct an std::map
where the key type is a reference type, e.g. Foo &
and if not, why not?
According to C++ Standard 23.1.2/7 key_type
should be assignable. Reference type is not.
相关文章
Can I construct an std::map
where the key type is a reference type, e.g. Foo &
and if not, why not?
According to C++ Standard 23.1.2/7 key_type
should be assignable. Reference type is not.
相关文章