Skip to content

Commit fb80a35

Browse files
clang-format
1 parent 734d584 commit fb80a35

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

include/beman/optional26/optional.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ concept enable_assign_from_other =
287287

288288
template <class T>
289289
class optional {
290-
static_assert(
291-
(!std::is_same_v<T, std::remove_cv_t<in_place_t>>)&&(!std::is_same_v<std::remove_cv_t<T>, nullopt_t>),
292-
"T must not be in_place_t or nullopt_t");
290+
static_assert((!std::is_same_v<T, std::remove_cv_t<in_place_t>>) &&
291+
(!std::is_same_v<std::remove_cv_t<T>, nullopt_t>),
292+
"T must not be in_place_t or nullopt_t");
293293

294294
struct empty {};
295295
union {
@@ -536,7 +536,8 @@ class optional {
536536
static_assert(!std::is_array_v<U>, "U must not be an array");
537537
static_assert(!std::is_same_v<U, in_place_t>, "U must not be an inplace type");
538538
static_assert(!std::is_same_v<U, nullopt_t>, "U must not be nullopt_t");
539-
static_assert(std::is_object_v<U> || std::is_reference_v<U>, "U must be either an object or a reference"); /// References now allowed
539+
static_assert(std::is_object_v<U> || std::is_reference_v<U>,
540+
"U must be either an object or a reference"); /// References now allowed
540541
return (has_value()) ? optional<U>{std::invoke(std::forward<F>(f), value_)} : optional<U>{};
541542
}
542543

@@ -546,7 +547,8 @@ class optional {
546547
static_assert(!std::is_array_v<U>, "U must not be an array");
547548
static_assert(!std::is_same_v<U, in_place_t>, "U must not be an inplace type");
548549
static_assert(!std::is_same_v<U, nullopt_t>, "U must not be nullopt_t type");
549-
static_assert(std::is_object_v<U> || std::is_reference_v<U>, "U must be either an objecy or a reference"); /// References now allowed
550+
static_assert(std::is_object_v<U> || std::is_reference_v<U>,
551+
"U must be either an objecy or a reference"); /// References now allowed
550552
return (has_value()) ? optional<U>{std::invoke(std::forward<F>(f), std::move(value_))} : optional<U>{};
551553
}
552554

0 commit comments

Comments
 (0)