Formatted code (#1007)

* Updated style

* Updated files

* fixed new line

* Updated spacing

* File fix WIP

* Updated to clang 13

* updated comment style

* Removed old comment code
This commit is contained in:
jLynx 2023-05-19 08:16:05 +12:00 committed by GitHub
parent 7aca7ce74d
commit 033c4e9a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
599 changed files with 70746 additions and 66896 deletions

View file

@ -24,19 +24,22 @@
#include <utility>
template<typename T>
template <typename T>
class Optional {
public:
constexpr Optional() : value_ { }, valid_ { false } { };
constexpr Optional(const T& value) : value_ { value }, valid_ { true } { };
constexpr Optional(T&& value) : value_ { std::move(value) }, valid_ { true } { };
public:
constexpr Optional()
: value_{}, valid_{false} {};
constexpr Optional(const T& value)
: value_{value}, valid_{true} {};
constexpr Optional(T&& value)
: value_{std::move(value)}, valid_{true} {};
bool is_valid() const { return valid_; };
T value() const { return value_; };
bool is_valid() const { return valid_; };
T value() const { return value_; };
private:
T value_;
bool valid_;
private:
T value_;
bool valid_;
};
#endif/*__OPTIONAL_H__*/
#endif /*__OPTIONAL_H__*/