Skip to content

Commit 89eaa14

Browse files
Resolved last issue
1 parent 5368fce commit 89eaa14

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

include/rfl/Commented.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,16 @@ struct Commented {
4343

4444
template <class U>
4545
requires(std::is_convertible_v<U, Type>)
46-
Commented(const U& _value) : value_(_value) {}
46+
Commented(const Commented<U>& _commented)
47+
: comment_(commented.comment()), value_(_commented.value()) {}
4748

4849
template <class U>
4950
requires(std::is_convertible_v<U, Type>)
50-
Commented(U&& _value) noexcept : value_(std::forward<U>(_value)) {}
51+
Commented(const U& _value) : value_(_value) {}
5152

5253
template <class U>
5354
requires(std::is_convertible_v<U, Type>)
54-
Commented(const Commented<U>& _commented) : value_(_commented.value()) {}
55+
Commented(U&& _value) noexcept : value_(std::forward<U>(_value)) {}
5556

5657
/// Assigns the underlying object to its default value.
5758
template <class U = Type>

0 commit comments

Comments
 (0)