File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ class Result {
4848 * - T must be constructible with perfectly forwarded value argument
4949 */
5050 template <typename U>
51- // TODO: figure out correct noexcept specifier
51+ noexcept (std::nothrow_constructible_from_v<T, U&&>)
5252 requires std::constructible_from<T, U&&>
5353 constexpr Result (U&& value)
5454 : value(std::forward<U>(value)) {}
@@ -78,7 +78,7 @@ class Result {
7878 * - T must be constructible with perfectly forwarded value argument
7979 */
8080 template <typename U>
81- // TODO: figure out correct noexcept specifier
81+ noexcept (std::nothrow_constructible_from_v<T, U&&>)
8282 requires std::constructible_from<T, U&&>
8383 constexpr Result (E error, U&& value)
8484 : error(error),
@@ -121,8 +121,7 @@ class Result {
121121 * @return "normal" value
122122 */
123123 template <typename Self>
124- // TODO: figure out correct noexcept specifier
125- constexpr auto get_value (this Self&& self) {
124+ constexpr auto get_value (this Self&& self) noexcept (noexcept (std::forward<Self>(self).value)) {
126125 return std::forward<Self>(self).value ;
127126 }
128127
You can’t perform that action at this time.
0 commit comments