File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1998,7 +1998,6 @@ _CCCL_HOST_DEVICE constexpr auto optional_map_impl(Opt&& opt, F&& f)
19981998 return opt.has_value () ? detail::invoke (std::forward<F>(f), *std::forward<Opt>(opt)) : optional<Ret>(nullopt );
19991999}
20002000
2001- _CCCL_SUPPRESS_DEPRECATED_PUSH
20022001_CCCL_EXEC_CHECK_DISABLE
20032002template <class Opt ,
20042003 class F ,
@@ -2009,12 +2008,20 @@ _CCCL_HOST_DEVICE auto optional_map_impl(Opt&& opt, F&& f)
20092008 if (opt.has_value ())
20102009 {
20112010 detail::invoke (std::forward<F>(f), *std::forward<Opt>(opt));
2011+ # if _CCCL_COMPILER(MSVC)
2012+ // MSVC fails to suppress the warning on make_optional
2013+ _CCCL_SUPPRESS_DEPRECATED_PUSH
2014+ return optional<monostate>(monostate{});
2015+ _CCCL_SUPPRESS_DEPRECATED_POP
2016+ # else
2017+ _CCCL_SUPPRESS_DEPRECATED_PUSH
20122018 return make_optional (monostate{});
2019+ _CCCL_SUPPRESS_DEPRECATED_POP
2020+ # endif
20132021 }
20142022
20152023 return optional<monostate>(nullopt );
20162024}
2017- _CCCL_SUPPRESS_DEPRECATED_POP
20182025# else
20192026_CCCL_EXEC_CHECK_DISABLE
20202027template <class Opt ,
You can’t perform that action at this time.
0 commit comments