diff --git a/BAN/include/BAN/Optional.h b/BAN/include/BAN/Optional.h index 611dff9d00..8f4987dfd8 100644 --- a/BAN/include/BAN/Optional.h +++ b/BAN/include/BAN/Optional.h @@ -18,8 +18,6 @@ namespace BAN constexpr Optional(const Optional&); constexpr Optional(const T&); constexpr Optional(T&&); - template - constexpr Optional(Args&&...); ~Optional(); @@ -85,14 +83,6 @@ namespace BAN new (m_storage) T(move(value)); } - template - template - constexpr Optional::Optional(Args&&... args) - : m_has_value(true) - { - new (m_storage) T(forward(args)...); - } - template Optional::~Optional() { diff --git a/userspace/programs/Shell/main.cpp b/userspace/programs/Shell/main.cpp index b36c30651c..645f26f23b 100644 --- a/userspace/programs/Shell/main.cpp +++ b/userspace/programs/Shell/main.cpp @@ -36,7 +36,7 @@ BAN::Optional parse_dollar(BAN::StringView command, size_t& i) ASSERT(command[i] == '$'); if (++i >= command.size()) - return "$"_sv; + return BAN::String("$"_sv); if (command[i] == '?') { @@ -53,8 +53,8 @@ BAN::Optional parse_dollar(BAN::StringView command, size_t& i) i += len - 1; if (const char* value = getenv(name.data())) - return BAN::StringView(value); - return ""_sv; + return BAN::String(value); + return BAN::String(); } else if (command[i] == '{') { @@ -74,8 +74,8 @@ BAN::Optional parse_dollar(BAN::StringView command, size_t& i) i += len; if (const char* value = getenv(name.data())) - return BAN::StringView(value); - return ""_sv; + return BAN::String(value); + return BAN::String(); } else if (command[i] == '[') {