* 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>
* 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.
* 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