Skip to content

Commit b2ab20d

Browse files
committed
Make codacy happy
1 parent c30d80f commit b2ab20d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/kangaru/detail/optional.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace kangaru {
3535
struct optional<T> {
3636
constexpr optional() = default;
3737

38-
constexpr optional(nullopt_t) noexcept : engaged{false}, storage{detail::optional::empty{}} {}
38+
explicit(false) constexpr optional(nullopt_t) noexcept : engaged{false}, storage{detail::optional::empty{}} {}
3939

4040
constexpr optional(optional const& other)
4141
requires(not std::is_trivially_copy_constructible_v<T>) : engaged{other.engaged}
@@ -395,20 +395,20 @@ namespace kangaru {
395395
and std::convertible_to<U*, T*>
396396
and not detail::utility::is_specialisation_of_v<optional, std::remove_cv_t<U>>
397397
)
398-
constexpr optional(U& ref) noexcept : pointer{std::addressof(ref)} {}
398+
explicit(false) constexpr optional(U& ref) noexcept : pointer{std::addressof(ref)} {}
399399

400400
template<object U>
401401
requires(
402402
std::is_rvalue_reference_v<T>
403403
and std::convertible_to<U*, T*>
404404
and not detail::utility::is_specialisation_of_v<optional, std::remove_cv_t<U>>
405405
)
406-
constexpr optional(U&& ref) noexcept : pointer{std::addressof(ref)} {}
406+
explicit(false) constexpr optional(U&& ref) noexcept : pointer{std::addressof(ref)} {}
407407

408408
template<reference U> requires std::convertible_to<U*, T*>
409409
constexpr optional(optional<U> const& opt) noexcept : pointer{opt ? std::addressof(*opt) : nullptr} {}
410410

411-
constexpr optional(nullopt_t) noexcept : pointer{nullptr} {}
411+
explicit(false) constexpr optional(nullopt_t) noexcept : pointer{nullptr} {}
412412

413413
constexpr auto operator=(T ref) noexcept -> optional& {
414414
pointer = std::addressof(ref);

0 commit comments

Comments
 (0)