Comments (3)
On a slightly pedantic note, an InlinedVector of objects in maybe-moved-from states is still in a valid state, so this technically satisfies basic exception safety -- but I agree it's not a nice thing to do.
I think this is a two step solution -- we declare that InlinedVector only supports T with nothrow move operators in the short term.
In the long term, Abseil's stance on throwing moves constructors is essentially that move constructors can only throw if the allocator can throw -- we're stricter than the standard on thsi point of view. So as I ramp up the exception-safety test suite we can advise the move constructor to be noexcept if the allocator is noexcept and use the current algorithm, and fall back to copying only if the allocator throws and T has a throwing move constructor.
Does this sound reasonable?
from abseil-cpp.
User reported test case at http://codepad.org/YbVsjMy5 but it seems to be inaccessible now.
from abseil-cpp.
Closing as a duplicate of #37
from abseil-cpp.
Related Issues (20)
- [Bug]: missing Mutex::Dtor on linux? HOT 17
- [Bug]: Parameter pack workaround fails with nvcc HOT 17
- [Bug]: Missing constructor for `absl::synchronization_internal::KernelTimeout` in shared builds HOT 5
- [Bug]: Constexpr expansion compilation error with GCC's UndefinedBehaviorSanitizer HOT 5
- [Bug]: internal/hash.h failed to compile in C++17 on GCC 7 HOT 1
- [Bug]: -Wmaybe-uninitialized warnings in InlinedVector
- [Bug]: Proto_library fails to build with abseil-cpp version = "20240116.0" HOT 2
- [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
- [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 1
- [Bug]: arm_neon.h inclusion causing issues HOT 2
- [CMake]: Could not find a configuration file for package "absl" that is compatible with requested version ""
- [Bug]: clang-analyzer-optin.core.EnumCastOutOfRange for static_cast<ctrl_t>(0) HOT 1
- [Bug]: undefined reference to `absl::lts_20240116::raw_log_internal::internal_log_function[abi:cxx11]' HOT 1
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.