You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using both your implementation for optional and expected in the same project,
and I got compile issues when including both in the same file and using map on either of them:
optional.h: In instantiation of 'constexpr auto tl::optional<T>::map(F&&) & [with F = MyFunction()::<lambda(int)>; T = int]':
file.cc:14:56: required from here
optional.h:770:20: error: call of overloaded 'map_impl(tl::optional<int>&, MyFunction()::<lambda(int)>)' is ambiguous
return map_impl(*this, std::forward<F>(f));
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
The problem is that both optional and expected use a helper called map_impl, but with different implementations.
A simple solution I applied is simply renaming map_impl to optional_map_impl and expected_map_impl, respectively.
Jeroen
PS Thanks a lot for these libraries, I love them :)
The text was updated successfully, but these errors were encountered:
Hey,
I am using both your implementation for
optional
andexpected
in the same project,and I got compile issues when including both in the same file and using
map
on either of them:Compilation failure:
The problem is that both
optional
andexpected
use a helper calledmap_impl
, but with different implementations.A simple solution I applied is simply renaming
map_impl
tooptional_map_impl
andexpected_map_impl
, respectively.Jeroen
PS Thanks a lot for these libraries, I love them :)
The text was updated successfully, but these errors were encountered: