zoukankan      html  css  js  c++  java
  • C++ Pitfalls 之 reference to an object in a dynamically allocated containter

    (留坑待填)

     Extraction from the C++ Programming Language 4th. ed., Bjarne Stroustrup

    31.3.3 Size and Capacity

    The size is the number of elements in the container; the capacity is the number of elements that a container can hold before allocating more memory.

    When changing the size or the capacity, the elements may be moved to new locations. That implies that iterators (and pointers and references) to elements may become invalid (i.e., point to the old element locations).

  • 相关阅读:
    oracle 锁查询
    ORACLE 本session产生的redo
    UML
    面向对象
    设计思维
    程序员习惯
    程序员修炼之道
    架构指南
    微服务架构
    测试用例
  • 原文地址:https://www.cnblogs.com/Patt/p/5819940.html
Copyright © 2011-2022 走看看