Commit 20c4185 1 parent 5d09ee6 commit 20c4185 Copy full SHA for 20c4185
File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -94,23 +94,23 @@ class StringConverter
94
94
}
95
95
96
96
template <typename T>
97
- std::string operator ()(std::optional<T>& & value) const
97
+ std::string operator ()(const std::optional<T>& value) const
98
98
{
99
99
if (!value) {
100
100
return nullptr ;
101
101
}
102
- return this ->operator ()(std::forward<T>( *value) );
102
+ return this ->operator ()(*value);
103
103
}
104
104
105
105
template <typename T>
106
106
requires has_output_operator<T>
107
- std::string operator ()(T& & value) const
107
+ std::string operator ()(const T & value) const
108
108
{
109
109
std::stringstream ss;
110
110
if constexpr (std::same_as<bool , std::decay_t <T>>) {
111
111
ss << std::boolalpha;
112
112
}
113
- ss << std::forward<T>( value) ;
113
+ ss << value;
114
114
return std::move (ss).str ();
115
115
}
116
116
You can’t perform that action at this time.
0 commit comments