Comments (5)
I'll take a look at the aliasing issues.
For exception safety, the short story is that we know InlinedVector isn't exception safe. I'm currently writing tooling for us to thoroughly test our classes for exception safety. Once we have that, we will start updating all of our types which need to worry about exceptions accordingly.
I would guess that InlinedVector will have slightly weaker guarantees than std::vector, partly for the reasons you outlined. Our current thought is that we will be going for basic exception safety everywhere, and strong exception safety where reasonable and where it won't affect performance.
from abseil-cpp.
The two-iterator insert, we won't support aliasing, just like in std::vector (#4 in http://en.cppreference.com/w/cpp/container/vector/insert).
The iterator-count overload is also being fixed, yes :)
from abseil-cpp.
I took a look at this today. Insert() indeed has a bug, and it is fixed in an internal change which will be upstreamed once accepted. Similarly with operator=.
I don't see the issue with push_back. push_back calls emplace_back, which if we need to grow, calls GrowAndEmplaceBack. GrowAndEmplaceBack first allocates a new buffer, then constructs the new object into it, then moves everything else into the new buffer, so it should be safe.
from abseil-cpp.
You're right, I was mistaken about push_back
, sorry.
The insert(const_iterator position, size_type n, const value_type& v)
and insert(const_iterator position, InputIterator first, InputIterator last)
(for forward iterators) overloads also suffer from this issue, but you've probably seen that too. Making the latter completely safe would hurt performance, but maybe an assert that checks e.g. the address of the first element in the range would be worth the overhead.
from abseil-cpp.
This is fixed in 5fcbe86
from abseil-cpp.
Related Issues (20)
- [Bug]: Unusable for installable projects whose other dependencies also define a `check` target HOT 3
- Resolving linking order is a nightmare on alpine HOT 4
- mismatched types โabsl::lts_2020_09_23::FormatSpec<Args ...>โ and โconst char [34]โ HOT 1
- [Bug]: Compilation error on mac: xcode command line interface 15.3
- [Bug]: Make absl::InitializeLog safe to be called multiple times HOT 1
- [Bug]: Cant compile app on windows with MinGW that use Absl::Flags target.
- [Bug]: Can't build on macOS: `'linux/futex.h' file not found`
- [Bug]: new flat_hash_map to empty string could cause memory corruption in c++20 HOT 7
- GCC 14: abseil-src/absl/numeric/internal/bits.h:309:24: error: '__builtin_ctzs' needs isa option -mbmi HOT 3
- [Bug]: arm_neon.h inclusion causing issues HOT 3
- [CMake]: Could not find a configuration file for package "absl" that is compatible with requested version "" HOT 1
- [Bug]: clang-analyzer-optin.core.EnumCastOutOfRange for static_cast<ctrl_t>(0) HOT 2
- [Bug]: undefined reference to `absl::lts_20240116::raw_log_internal::internal_log_function[abi:cxx11]' HOT 1
- [Bug]: algorithm\container.h is missing random header and causing compilation error when building protobuf in VS2022 HOT 1
- [Bug]: ASAN use-after-poison in TimeZoneInfo HOT 6
- [Bug]: SEGV with btree_set::equal_range HOT 2
- [Bug]: build failure on redhat/ubi8 HOT 1
- [Bug]: Compilation error for filesystem HOT 1
- [Bug]: raw hash set test crash on centos7 HOT 1
- [Bug]: NegativeNaN test fails on riscv64 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abseil-cpp.