mirror of
https://github.com/TartanLlama/optional.git
synced 2025-08-02 03:14:26 +02:00
Compiler support
This commit is contained in:
10
README.md
10
README.md
@@ -2,3 +2,13 @@
|
|||||||
Work in progress implementation of std::optional with monadic extensions
|
Work in progress implementation of std::optional with monadic extensions
|
||||||
|
|
||||||
[](https://travis-ci.org/TartanLlama/monadic-optional)
|
[](https://travis-ci.org/TartanLlama/monadic-optional)
|
||||||
|
|
||||||
|
### Compiler support
|
||||||
|
|
||||||
|
Tested on:
|
||||||
|
|
||||||
|
- clang 3.9
|
||||||
|
- clang 3.8
|
||||||
|
- g++ 7.2
|
||||||
|
- g++ 5.4
|
||||||
|
- g++ 4.8.5
|
||||||
|
@@ -9,14 +9,12 @@
|
|||||||
|
|
||||||
TEST_CASE("Constexpr", "[constexpr]") {
|
TEST_CASE("Constexpr", "[constexpr]") {
|
||||||
SECTION("empty construct") {
|
SECTION("empty construct") {
|
||||||
constexpr tl::optional<int> o1;
|
|
||||||
constexpr tl::optional<int> o2{};
|
constexpr tl::optional<int> o2{};
|
||||||
constexpr tl::optional<int> o3 = {};
|
constexpr tl::optional<int> o3 = {};
|
||||||
constexpr tl::optional<int> o4 = tl::nullopt;
|
constexpr tl::optional<int> o4 = tl::nullopt;
|
||||||
constexpr tl::optional<int> o5 = {tl::nullopt};
|
constexpr tl::optional<int> o5 = {tl::nullopt};
|
||||||
constexpr tl::optional<int> o6(tl::nullopt);
|
constexpr tl::optional<int> o6(tl::nullopt);
|
||||||
|
|
||||||
STATIC_REQUIRE(!o1);
|
|
||||||
STATIC_REQUIRE(!o2);
|
STATIC_REQUIRE(!o2);
|
||||||
STATIC_REQUIRE(!o3);
|
STATIC_REQUIRE(!o3);
|
||||||
STATIC_REQUIRE(!o4);
|
STATIC_REQUIRE(!o4);
|
||||||
|
Reference in New Issue
Block a user