243 Commits

Author SHA1 Message Date
Sy Brand
2de13e9cf5 Update cmake.yml 2025-01-21 10:48:08 +00:00
Sy Brand
27e81c3093 Update cmake.yml 2025-01-21 10:38:46 +00:00
Sy Brand
0a2e5492c9 Update cmake.yml 2025-01-21 10:34:13 +00:00
Sy Brand
0d8044c494 Update cmake.yml 2025-01-21 10:30:43 +00:00
Sy Brand
0c1a84e3ef Update cmake.yml 2025-01-21 10:29:14 +00:00
Sy Brand
e489e21078 Update cmake.yml 2025-01-21 10:26:12 +00:00
Sy Brand
d9dfa9de61 Update cmake.yml 2025-01-21 10:25:35 +00:00
Sy Brand
9b84a0b8b9 Update cmake.yml 2025-01-21 10:18:35 +00:00
Sy Brand
26b2a30964 Use more recent ubuntu 2025-01-21 10:13:41 +00:00
georg-emg
273a859e05 added workaround for wrong value of __cplusplus in MSVC compiler (#136) 2025-01-21 10:04:12 +00:00
Bruce Mitchener
c5e8e3c39b ci: Update to actions/checkout@v4 from v3. (#155)
This is an update to the more recent NodeJS toolchain within
GitHub Actions.
2025-01-21 09:50:13 +00:00
Klaim (Joël Lamotte)
e370ef802d Add link to build2 package (#143)
This is just a link to the `build2` package and also that mention makes it clear it's available there.
2025-01-21 09:48:35 +00:00
Bruce Mitchener
f441b29e11 Fix typo. (#154) 2025-01-21 09:47:55 +00:00
Bojan Strbac
a0ef772cbe Fix bug in unequal operator with void as expected value (#156) 2025-01-21 09:47:24 +00:00
Sy Brand
735634d78b Add test for PR 156 2025-01-21 09:47:03 +00:00
Sy Brand
3f0ca7b192 Update CMakeLists.txt 2023-04-26 09:14:41 +01:00
Vratislav Podzimek
aa4f7a5e24 Add CMake artifacts to .gitignore (#139)
Otherwise they cause noise when this library is used as a git
submodule and a CMake subdirectory in a project like this:

  Changes not staged for commit:
    (use "git add <file>..." to update what will be committed)
    (use "git restore <file>..." to discard changes in working directory)
    (commit or discard the untracked or modified content in submodules)
	  modified:   vendor/expected (untracked content)

Running `cmake .` in such a project creates CMake artifacts and
then `git status` reports them "untracked content".

Signed-off-by: Vratislav Podzimek <v.podzimek@mykolab.com>
2023-03-15 10:34:03 +00:00
Sy Brand
292eff8bd8 Bump version v1.1.0 2023-03-15 10:28:19 +00:00
j-mew-s
3e304a4bdd remove submodule directory (#138) 2023-02-24 11:52:32 +00:00
Sy Brand
2a72b2f829 Delete .gitmodules 2023-02-24 09:11:23 +00:00
Sy Brand
9d812f5e3b Fix unclosed ifdef 2023-02-15 16:37:34 +00:00
Sy Brand
3a13214ff1 Test transform and transform_error 2023-02-15 16:34:53 +00:00
Sy Brand
5f9170aad5 Add transform_error 2023-02-15 16:32:19 +00:00
Sy Brand
1369d77100 Update expected.hpp 2023-02-15 16:17:09 +00:00
Sy Brand
ac297a9f1e Fix TL_ASSERT 2023-02-15 16:09:50 +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
4ce32056c6 Use assert in C++14+ 2023-02-15 16:06:01 +00:00
Sy Brand
4f4fae82a5 Update issues.cpp 2023-02-15 16:00:16 +00:00
Sy Brand
0ffb9dcebc Update expected.hpp 2023-02-15 15:59:54 +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
b74fecd444 Update Catch version 2022-11-24 19:54:26 +00:00
Sy Brand
11cb3fdb93 Change name 2022-11-24 19:48:55 +00:00
Sy Brand
7465f4eabe Update tested versions 2022-11-24 19:48:10 +00:00
Sy Brand
7e842ac198 Test on many compilers (#123) 2022-11-24 19:44:29 +00:00
Sy Brand
61a4d18434 Auto-format
Fixes #65
2022-11-24 14:45:26 +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
Simon Truscott
cd8c7920b3 Use move construction in swap implementation (#103)
* Use correct type alias in swap helper function

This was not an issue since both t_is_nothrow_move_constructible and
e_is_nothrow_move_constructible are type aliases for std::true_type.

* Use move instead of copy in swap implementation
2022-11-24 13:17:42 +00:00
Sy Brand
f88d817e06 Compile on VS2015 2022-11-24 13:11:50 +00:00
Sy Brand
9411e359b3 Merge branch 'master' of github.com:TartanLlama/expected 2022-11-24 13:11:40 +00:00
Sy Brand
e6d1f6e6bc Create cmake.yml 2022-11-24 13:07:34 +00:00
Sy Brand
d72ac6d2c9 Compile on VS 2015 2022-11-24 13:03:27 +00:00
Sy Brand
6b9843d4d2 Update .appveyor.yml 2022-11-24 13:02:29 +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
Jackson
fb0bd6e79d Add deduction guide to tl::unexpected (#109) 2022-11-24 12:22:17 +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