From 0f2c18d5543a1019203a4c0b65131affb492a5ce Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 25 Apr 2024 23:03:38 -0500 Subject: [PATCH] [ox/std] Add std::string(_view) variant of MaybeView --- deps/ox/src/ox/std/maybeview.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/deps/ox/src/ox/std/maybeview.hpp b/deps/ox/src/ox/std/maybeview.hpp index 149cd97f..9860e4d6 100644 --- a/deps/ox/src/ox/std/maybeview.hpp +++ b/deps/ox/src/ox/std/maybeview.hpp @@ -8,7 +8,10 @@ #pragma once -#include "typetraits.hpp" +#if __has_include() +#include +#include +#endif namespace ox { @@ -23,4 +26,11 @@ struct MaybeView { template using MaybeView_t = typename MaybeView::type; +#if __has_include() +template +struct MaybeView> { + using type = std::basic_string_view; +}; +#endif + }