← Back to context

Comment by RossBencina

7 hours ago

In many application code bases no doubt. But how do you think make_unique and make_shared are implemented?

With what will most likely become [[unsafe]] profile in C++29, assuming WG21 actually gets their profiles story right.

  • Classic C++, any issue is at most three years away from going away! There will definitely not be any other issues that are also three years from getting fixed when you reach that year though

    • Actually no, because you are missing the time between standard being ratified and actuality being widely available in all major compilers.

      By the way, it is also classical Web standards, C, Vulkan, OpenCL, and everything else that has a similar process.

      Ideally we should have gotten rid of C and C++, but I haven't yet found a better Typescript for C.

  • I don't think adding unsafe will be possible - it will break too much existing code. We might be able to add something new that is only possible in an unsafe context, but there is too much existing code.

    However I do expect a [[safe]] profile (or perhaps several, depending on which paper you read) that everyone is encourage to opt-in to. Likely combines with compiler warnings and static analysis to encourage that use. (Also syntax is still open for debate)

    • Check the WG21 mailing proposals.

      I was for Safe C++ paper, based on Circle experience, but it was shot down due to politics.

      So we're left with the profiles camp actually delivering, followed by the remaining compilers caring to actually implement them, otherwise it will be static and dynamic analysis as usual.

      2 replies →