Sy Brand
735634d78b
Add test for PR 156
2025-01-21 09:47:03 +00:00
Sy Brand
3a13214ff1
Test transform and transform_error
2023-02-15 16:34:53 +00:00
Sy Brand
f6473697cd
Don't use std::make_unique in C++11 mode
2023-02-15 16:09:14 +00:00
Sy Brand
4f4fae82a5
Update issues.cpp
2023-02-15 16:00:16 +00:00
Andrew Byers
f5e6e9aeed
Fixed issue #129 ( #131 )
...
+ Fixed unused variable warning
+ Added a `std::move` to avoid calling copy-assignment operator on non-copyable types
Co-authored-by: andy-byers <andrew.byers@utdallas.edu >
2023-02-15 15:54:16 +00:00
Daira Hopwood
79a2068c9a
Remove undefined behaviour ( #117 )
...
* Add assertions for cases where the API documents undefined behaviour.
This affects operator->, operator*, and error() on a tl::expected
instance. The performance impact is likely negligible for typical uses.
refs #113
Signed-off-by: Daira Hopwood <daira@jacaranda.org >
* Add tests for assertions.
Signed-off-by: Daira Hopwood <daira@jacaranda.org >
* Add documentation for assertion behaviour.
Signed-off-by: Daira Hopwood <daira@jacaranda.org >
---------
Signed-off-by: Daira Hopwood <daira@jacaranda.org >
2023-02-15 15:53:21 +00:00
Sy Brand
f11bba1db5
Merge branch 'master' of github.com:TartanLlama/expected
2022-11-24 13:22:17 +00:00
Sy Brand
af47239f3f
Fix issue 122 test
2022-11-24 13:22:11 +00:00
Simon Truscott
2675ce3cd4
Fix warnings in test ( #92 )
...
* Convert tabs to spaces
* Remove extra semicolons in test
* Fix warnings in test
-Wreturn-type
-Wunused-parameter
-Wunused-value
* Fix -Wunused-variable warning in test
The variable 'failptr' is unused. From looking at the other variables in the
test case, it seems the fix is to first remove 'failptr' and then rename
'efail' to 'failptr'.
* Fix -Wunused-variable warning in test
* Fix -Wmacro-redefined warning in test
STATIC_REQUIRE has a previous definition in catch2/catch.hpp.
2022-11-24 13:18:39 +00:00
Sy Brand
f88d817e06
Compile on VS2015
2022-11-24 13:11:50 +00:00
Sy Brand
d72ac6d2c9
Compile on VS 2015
2022-11-24 13:03:27 +00:00
Sy Brand
4e86bddee3
Add variadic constructors for tl::unexpected
2022-11-24 12:52:29 +00:00
Sy Brand
4621a489bf
Add tests for tl::unexpected guide
2022-11-24 12:23:11 +00:00
Sy Brand
f5d8f5c462
Remove unneccesary move in emplace
...
Fixes #122
2022-11-24 12:01:40 +00:00
Sy Brand
d901f362cc
Fix equality test for expected<void,E>
2022-11-24 11:50:20 +00:00
Isabella Muerte
0ca73ee30e
🎨 Revamp CMake to be correct and easy to understand ( #69 )
...
🎨 Cleanup include path for catch2
✨ Add basic .deb generation support
WiX and RPM support is still needed (if even desired?)
⬆️ Upgrade minimum CMake version to 3.14
⬆️ Upgrade Catch to Catch v2.9.2
📌 Pin Catch to v2.9.2
2019-10-25 14:44:01 +01:00
Simon Brand
6fe2af5191
Move the error value when throwing an exception in .value rval overloads ( #62 )
...
* Move the error value when throwing an exception in .value rval overloads
Fixes #61
* Bump version
2019-07-10 09:26:02 +01:00
Simon Brand
90ed23a4e4
Do CMake properly
2019-05-01 12:15:40 +01:00
Simon Brand
3674ba5295
Merge swapping
2019-04-26 13:44:27 +01:00
Simon Brand
815238795a
ifdef out GCC compiler error
2019-02-25 12:20:13 +00:00
Simon Brand
edfdf3e689
Move error inside and_then
...
Fixes #49
2019-02-25 11:51:54 +00:00
Simon Brand
89670f8b21
Don't destroy value in expected<void,E>
...
Fixes #43
2018-11-11 11:25:16 +00:00
Simon Brand
08b39b8042
Fix #42
2018-11-10 09:31:56 +00:00
Simon Brand
03689e9d21
Fix #34
2018-09-03 08:41:42 +01:00
Simon Brand
7b7519ff4a
Make issue test C++11
2018-08-30 14:14:35 +01:00
Simon Brand
1a88b36169
Fix #33
2018-08-30 13:57:28 +01:00
Simon Brand
6a2bc3888f
Fix #32
2018-08-30 08:43:09 +01:00
Simon Brand
4aa086e242
Support mapping no-arg functions for void expecteds
2018-08-24 10:08:20 +01:00
Simon Brand
d7cf0688f1
Add test for #31
2018-08-23 11:55:38 +01:00
Simon Brand
53527b804b
Add test for issue 23
2018-08-22 15:09:59 +01:00
Simon Brand
e72a56d40d
Fix MSVC error
2018-08-22 14:02:43 +01:00
Simon Brand
266bd8f18d
Add issue 30 test
2018-08-22 13:47:12 +01:00
Simon Brand
fa6af33347
Fix #29
2018-08-14 10:02:05 +01:00
Simon Brand
414c1dafa1
Fix #26
2018-06-08 12:35:38 +01:00
Björn Fahller
5055e6382c
or_else calls func with error state ( #22 )
...
* or_else calls func with error state
* Hopefully worked around C++11 issues with or_else
* or_else with g++-4.8 not supporting const&& overloads
2018-05-28 12:09:43 +01:00
Simon Brand
8af00662d9
Fix #17
2018-05-11 08:26:41 +01:00
Simon Brand
ed0c4eb48a
Fix #14
2018-03-01 15:05:15 +00:00
Simon Brand
af06714a56
Rename type trait macros
2018-01-14 07:37:23 +00:00
Simon Brand
01dcb2f7bc
More constexpr fixes
2017-12-23 15:43:35 +00:00
Simon Brand
9ff078cc24
Remove bad tests
2017-12-23 15:17:14 +00:00
Simon Brand
2d7dfc8b02
More void support
2017-12-23 15:13:38 +00:00
Simon Brand
24b4725966
Fix #1
2017-12-19 15:04:45 +00:00
Simon Brand
468c403c91
Initial void support
2017-12-18 15:57:49 +00:00
Simon Brand
dee71e8bcd
More tests
2017-12-05 20:47:14 +00:00
Simon Brand
cb74470fc7
Merge branch 'master' into trivial_copy_fix
2017-12-05 20:19:46 +00:00
Simon Brand
0980210d1c
More tests
2017-12-05 19:59:49 +00:00
Simon Brand
9423013aca
Support void for map_error
2017-12-03 08:25:19 +00:00
Kévin Alexandre Boissonneault
5bed466a7e
Fixed copy-paste error
2017-12-02 20:18:26 -05:00
Kévin Alexandre Boissonneault
0f335690db
Fixed compilation on "is_trivially_*" traits on GCC4.8+
2017-12-02 20:13:08 -05:00
Kévin Alexandre Boissonneault
65cf9dd693
Fixed missing includes
2017-12-02 19:55:35 -05:00