Giter Site home page Giter Site logo

Comments (4)

vasama avatar vasama commented on August 20, 2024 1

I have implemented this here: https://github.com/vasama/MSSTL/tree/feature/inplace_vector

When you start accepting C++26 features, I will be happy to reopen and update my PR.
Please comment in this issue so that I receive a notification about it.

from stl.

StephanTLavavej avatar StephanTLavavej commented on August 20, 2024 1

Dynamically allocated proxy objects are a bane, and we should avoid adding any more.

There's no point in container-internal proxy objects - their whole purpose is to allow iterators to find their parents after swapping/moving. (Note the distinction between them and sentinel nodes. Container-internal sentinel nodes work because they don't remain valid after swapping/moving.)

from stl.

vasama avatar vasama commented on August 20, 2024 1

In my implementation the debug iterator currently contains a pointer directly to the size member of the inplace_vector, which is a null pointer in the case of zero capacity. This is used by the iterator itself to detect out-of-bounds accesses. The vector itself detects its own iterators using the data pointer also stored in the iterator.

from stl.

frederick-vs-ja avatar frederick-vs-ja commented on August 20, 2024

A proxy object for container/iterator debugging will make the container totally non-trivial, which is fine for all containers but array and inplace_vector. The problem is more severe for inplace_vector because the valid range of an inplace_vector object can vary among its lifetime.

Do we want to add a proxy object (but shouldn't be dynamically allocated if added) for debugging when it's allowed to do so?

from stl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.