Compiler support

This commit is contained in:
Simon Brand
2017-10-11 19:09:06 +01:00
parent 519c110740
commit 427aeebda1
2 changed files with 10 additions and 2 deletions

View File

@@ -2,3 +2,13 @@
Work in progress implementation of std::optional with monadic extensions
[![Linux Build Status](https://travis-ci.org/TartanLlama/monadic-optional.png?branch=master)](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

View File

@@ -9,14 +9,12 @@
TEST_CASE("Constexpr", "[constexpr]") {
SECTION("empty construct") {
constexpr tl::optional<int> o1;
constexpr tl::optional<int> o2{};
constexpr tl::optional<int> o3 = {};
constexpr tl::optional<int> o4 = tl::nullopt;
constexpr tl::optional<int> o5 = {tl::nullopt};
constexpr tl::optional<int> o6(tl::nullopt);
STATIC_REQUIRE(!o1);
STATIC_REQUIRE(!o2);
STATIC_REQUIRE(!o3);
STATIC_REQUIRE(!o4);