diff options
author | Victor Zverovich <viz@meta.com> | 2024-01-01 08:14:52 -0800 |
---|---|---|
committer | Victor Zverovich <viz@meta.com> | 2024-01-01 09:03:46 -0800 |
commit | 1705600be37278184740b06f3da7e2c3837cfe1f (patch) | |
tree | cb539b65dea097d32d551739a8c361b4b415e18b | |
parent | 0c345dccd23e58ee0eae1d4e46cb4ab82bf8a668 (diff) | |
download | fmtlib-1705600be37278184740b06f3da7e2c3837cfe1f.tar.gz |
Remove optional
-rw-r--r-- | test/scan.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/test/scan.h b/test/scan.h index f6c5a169..0869e879 100644 --- a/test/scan.h +++ b/test/scan.h @@ -16,23 +16,6 @@ namespace detail { inline bool is_whitespace(char c) { return c == ' ' || c == '\n'; } -template <typename T> class optional { - private: - T value_; - bool has_value_ = false; - - public: - optional() = default; - optional(T value) : value_(std::move(value)), has_value_(true) {} - - explicit operator bool() const { return has_value_; } - - auto operator*() const -> const T& { - if (!has_value_) throw std::runtime_error("bad optional access"); - return value_; - } -}; - struct maybe_contiguous_range { const char* begin; const char* end; |