Code Monkey home page Code Monkey logo

Comments (5)

JonathanDCohen avatar JonathanDCohen commented on May 18, 2024 1

Another update: working on any has exposed that our framework needs to gracefully be able to deal with the Strong guarantee for types which do't have operator== and the need to deal with post-conditions on constructors, including lack of resource leaks.

So upcoming will be an update that will let us test constructors and an enhancement which removes the need for any T to be copy-constructible or equality-comparable in order to test the Strong Guarantee. I suspect this will be the last major overhaul of this framework, but who knows?

from abseil-cpp.

JonathanDCohen avatar JonathanDCohen commented on May 18, 2024

An update: in today's daily release there was the addition of absl/base/internal/exception_safety_testing.{h,cc}

This is an exception-safety test framework loosely based off of Dave Abraham's article Exception-Safety in Generic Components

The framework will evolve slightly as we test-drive it with our own types. The first up to test will be absl::any because it is simple, has a small interface, and is most likely already correct as far as we can tell. After that the first priority is InlinedVector, which is the most difficult to get right, followed by the rest of Abseil.

from abseil-cpp.

JonathanDCohen avatar JonathanDCohen commented on May 18, 2024

Turns out any is much harder than it seems! After finding a bug in the standard (http://cplusplus.github.io/LWG/lwg-defects.html#2162) and a bug in libstdc++ std::any (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83658) we've gotten through the exception safety test for absl::any. See absl/types/any_exception_safety_test.cc

The good news is finding an exception-safety bug in a library like libstdc++ gives me really high confidence that the exception-safety test suite is working well, and we should see significant improvements to the exception safety of Abseil in the near future.

from abseil-cpp.

J-Richter avatar J-Richter commented on May 18, 2024

I've noticed an exception-safety problem with flat_hash_map. Is this issue still being worked on? Should I file a bug report or just wait for the fixes? But after 4 years its perhaps not going anywhere soon? Perhaps this problems with exception safety should be placed more prominently on the website.

from abseil-cpp.

derekmauro avatar derekmauro commented on May 18, 2024

Please file a report so we know what the issue is.

from abseil-cpp.

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.