Comments (5)
Fixed! Thanks for the BR!
from outcome.
Proposed fix:
template <class Base> struct value_storage_delete_copy_constructor : Base // NOLINT
{
using Base::Base;
using value_type = typename Base::value_type;
using error_type = typename Base::error_type;
value_storage_delete_copy_constructor() = default;
value_storage_delete_copy_constructor(const value_storage_delete_copy_constructor &) = delete;
value_storage_delete_copy_constructor(value_storage_delete_copy_constructor &&) = default; // NOLINT
+ value_storage_delete_copy_constructor &operator=(const value_storage_delete_copy_constructor &o) = default;
+ value_storage_delete_copy_constructor &operator=(value_storage_delete_copy_constructor &&o) = default; // NOLINT
};
value_storage_delete_move_constructor
may need some love too...
from outcome.
Copy assignment is also problematic: godbolt.org
The following would seem to fix it:
using value_storage_select_move_assignment =
std::conditional_t<std::is_trivially_move_assignable<devoid<T>>::value && std::is_trivially_move_assignable<devoid<E>>::value,
value_storage_select_copy_constructor<T, E>,
std::conditional_t<std::is_move_assignable<devoid<T>>::value && std::is_move_assignable<devoid<E>>::value,
value_storage_nontrivial_move_assignment<value_storage_select_copy_constructor<T, E>>,
- value_storage_delete_copy_assignment<value_storage_select_copy_constructor<T, E>>>>;
+ value_storage_delete_move_assignment<value_storage_select_copy_constructor<T, E>>>>;
from outcome.
Dear dear, I cannot believe this was never reported until now. Thanks for the BR!
from outcome.
No problem!
from outcome.
Related Issues (20)
- `__cpp_modules` now defined in latest MSVC (version > 16.9) HOT 11
- OUTCOME_TRY does not propagate spare storage HOT 1
- Add check that `basic-outcome.hpp` never includes headers it is documented to not include
- warning: the 'bool' keyword is not allowed in a C++20 concept definition HOT 5
- error C2230: could not find module 'BOOST_OUTCOME_V2_BOOST_OUTCOME_C_MODULE_NAME' HOT 1
- Outcome failed to build due to error C2230 C7568 C2955 C2057 on windows with MSVC HOT 3
- Worked example for experimental features failed to compile on g++-7 HOT 6
- constexpr basic_result? HOT 14
- Example doesn't compile HOT 7
- Problem with void value type and nontrivial assignment operators HOT 2
- change of no-error path behavior leading to maybe-uninitialized warning HOT 2
- Build fails with ninja generator HOT 2
- Build fails with MSVC HOT 2
- Build fails with GCC 10 HOT 4
- Errors with non-embedded status code HOT 3
- .
- msvc 2022 C2027, compilation error HOT 3
- hooks.cpp, expected-pass.cpp fail on msvc-14.2; expected-pass.cpp fails on msvc-14.3 HOT 22
- WG21-P1886 errors 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 outcome.