244 Commits

Author SHA1 Message Date
41d3e1f48d Add missing include 2025-01-21 12:31:55 +00:00
d31c03e5ad Add natvis file 2025-01-21 12:29:19 +00:00
86d6b9a6bb Add test for #145 2025-01-21 11:56:43 +00:00
f7f82e3810 Fix #145 2025-01-21 11:55:31 +00:00
db7add9a80 MSVC fixes 2025-01-21 10:58:22 +00:00
5ec21f29fa Fix GitHub Actions (#163)
* Update cmake.yml

* Update cmake.yml

* Update cmake.yml

* Update cmake.yml

* Update cmake.yml

* Update cmake.yml

* Update cmake.yml
2025-01-21 10:55:24 +00:00
f01260d935 Update cmake.yml 2025-01-21 10:25:23 +00:00
a3088511ed Update cmake.yml 2025-01-21 10:23:14 +00:00
9b84a0b8b9 Update cmake.yml 2025-01-21 10:18:35 +00:00
26b2a30964 Use more recent ubuntu 2025-01-21 10:13:41 +00:00
273a859e05 added workaround for wrong value of __cplusplus in MSVC compiler (#136) 2025-01-21 10:04:12 +00:00
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
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
f441b29e11 Fix typo. (#154) 2025-01-21 09:47:55 +00:00
a0ef772cbe Fix bug in unequal operator with void as expected value (#156) 2025-01-21 09:47:24 +00:00
735634d78b Add test for PR 156 2025-01-21 09:47:03 +00:00
3f0ca7b192 Update CMakeLists.txt 2023-04-26 09:14:41 +01:00
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
292eff8bd8 Bump version v1.1.0 2023-03-15 10:28:19 +00:00
3e304a4bdd remove submodule directory (#138) 2023-02-24 11:52:32 +00:00
2a72b2f829 Delete .gitmodules 2023-02-24 09:11:23 +00:00
9d812f5e3b Fix unclosed ifdef 2023-02-15 16:37:34 +00:00
3a13214ff1 Test transform and transform_error 2023-02-15 16:34:53 +00:00
5f9170aad5 Add transform_error 2023-02-15 16:32:19 +00:00
1369d77100 Update expected.hpp 2023-02-15 16:17:09 +00:00
ac297a9f1e Fix TL_ASSERT 2023-02-15 16:09:50 +00:00
f6473697cd Don't use std::make_unique in C++11 mode 2023-02-15 16:09:14 +00:00
4ce32056c6 Use assert in C++14+ 2023-02-15 16:06:01 +00:00
4f4fae82a5 Update issues.cpp 2023-02-15 16:00:16 +00:00
0ffb9dcebc Update expected.hpp 2023-02-15 15:59:54 +00:00
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
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
b74fecd444 Update Catch version 2022-11-24 19:54:26 +00:00
11cb3fdb93 Change name 2022-11-24 19:48:55 +00:00
7465f4eabe Update tested versions 2022-11-24 19:48:10 +00:00
7e842ac198 Test on many compilers (#123) 2022-11-24 19:44:29 +00:00
61a4d18434 Auto-format
Fixes #65
2022-11-24 14:45:26 +00:00
f11bba1db5 Merge branch 'master' of github.com:TartanLlama/expected 2022-11-24 13:22:17 +00:00
af47239f3f Fix issue 122 test 2022-11-24 13:22:11 +00:00
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
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
f88d817e06 Compile on VS2015 2022-11-24 13:11:50 +00:00
9411e359b3 Merge branch 'master' of github.com:TartanLlama/expected 2022-11-24 13:11:40 +00:00
e6d1f6e6bc Create cmake.yml 2022-11-24 13:07:34 +00:00
d72ac6d2c9 Compile on VS 2015 2022-11-24 13:03:27 +00:00
6b9843d4d2 Update .appveyor.yml 2022-11-24 13:02:29 +00:00
4e86bddee3 Add variadic constructors for tl::unexpected 2022-11-24 12:52:29 +00:00
4621a489bf Add tests for tl::unexpected guide 2022-11-24 12:23:11 +00:00
fb0bd6e79d Add deduction guide to tl::unexpected (#109) 2022-11-24 12:22:17 +00:00
f5d8f5c462 Remove unneccesary move in emplace
Fixes #122
2022-11-24 12:01:40 +00:00