Skip to content

Commit b54cf84

Browse files
more msg
1 parent 7b83b1d commit b54cf84

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/beman/optional26/optional.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,10 @@ class optional {
542542
template <class F>
543543
constexpr auto transform(F&& f) && {
544544
using U = std::invoke_result_t<F, T&&>;
545-
static_assert(!std::is_array_v<U>);
546-
static_assert(!std::is_same_v<U, in_place_t>);
547-
static_assert(!std::is_same_v<U, nullopt_t>);
548-
static_assert(std::is_object_v<U> || std::is_reference_v<U>); /// References now allowed
545+
static_assert(!std::is_array_v<U>, "U must not be an array");
546+
static_assert(!std::is_same_v<U, in_place_t>, "U must not be an inplace type");
547+
static_assert(!std::is_same_v<U, nullopt_t>, "U must not be null_opt type");
548+
static_assert(std::is_object_v<U> || std::is_reference_v<U>, "U must be either an objecy or a reference"); /// References now allowed
549549
return (has_value()) ? optional<U>{std::invoke(std::forward<F>(f), std::move(value_))} : optional<U>{};
550550
}
551551

0 commit comments

Comments
 (0)