Commit 17316327 authored by Dominik Charousset's avatar Dominik Charousset

Merge branch 'integration/1246'

parents b34f70a1 e46dd349
......@@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file. The format
is based on [Keep a Changelog](https://keepachangelog.com).
## [Unreleased]
### Fixed
- For types that offer implicit type conversion, trying to construct a
`result<T>` could result in ambiguity since compilers could construct either
`T` itself or `expected<T>` for calling a constructor of `result<T>`. To fix
the ambiguity, `result<T>` now accepts any type that allows constructing a `T`
internally without requiring a type conversion to `T` as an argument (#1245).
## [0.18.2] - 2021-03-26
### Added
......
......@@ -184,7 +184,9 @@ public:
using super::super;
result(T x) : super(detail::result_base_message_init{}, std::move(x)) {
template <class U, class = std::enable_if_t<std::is_constructible_v<T, U>>>
result(U&& x)
: super(detail::result_base_message_init{}, T{std::forward<U>(x)}) {
// nop
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment