[signals2][variant] inline warning with MSVC 2022

Gavin Lambert via Boost-users <[email protected]>
Newsgroups gmane.comp.lib.boost.user
Message-ID <[email protected]>
This may not be a new issue, as I'm trying to update a project from 
Boost 1.68 to 1.80 (big jump!), but in trying to compile I'm being hit 
with this lengthy warning (and this particular project is building with 
warnings as errors, so this is problematic):

     warning C4714: function 'class boost::variant<class 
boost::shared_ptr<void>,class 
boost::signals2::detail::foreign_void_shared_ptr> __cdecl 
boost::detail::variant::visitation_impl<struct 
boost::mpl::int_<0>,struct 
boost::detail::variant::visitation_impl_step<struct 
boost::mpl::l_iter<struct boost::mpl::l_item<struct 
boost::mpl::long_<3>,class boost::weak_ptr<class 
boost::signals2::detail::trackable_pointee>,struct 
boost::mpl::l_item<struct boost::mpl::long_<2>,class 
boost::weak_ptr<void>,struct boost::mpl::l_item<struct 
boost::mpl::long_<1>,class 
boost::signals2::detail::foreign_void_weak_ptr,struct boost::mpl::l_end> 
 > > >,struct boost::mpl::l_iter<struct boost::mpl::l_end> >,class 
boost::detail::variant::invoke_visitor<class 
boost::signals2::detail::lock_weak_ptr_visitor const ,0>,void const 
*,struct boost::variant<class boost::weak_ptr<class 
boost::signals2::detail::trackable_pointee>,class 
boost::weak_ptr<void>,class 
boost::signals2::detail::foreign_void_weak_ptr>::has_fallback_type_>(int,int,class 
boost::detail::variant::invoke_visitor<class 
boost::signals2::detail::lock_weak_ptr_visitor const ,0> &,void const 
*,struct boost::mpl::bool_<0>,struct boost::variant<class 
boost::weak_ptr<class boost::signals2::detail::trackable_pointee>,class 
boost::weak_ptr<void>,class 
boost::signals2::detail::foreign_void_weak_ptr>::has_fallback_type_,struct 
boost::mpl::int_<0> *,struct 
boost::detail::variant::visitation_impl_step<struct 
boost::mpl::l_iter<struct boost::mpl::l_item<struct 
boost::mpl::long_<3>,class boost::weak_ptr<class 
boost::signals2::detail::trackable_pointee>,struct 
boost::mpl::l_item<struct boost::mpl::long_<2>,class 
boost::weak_ptr<void>,struct boost::mpl::l_item<struct 
boost::mpl::long_<1>,class 
boost::signals2::detail::foreign_void_weak_ptr,struct boost::mpl::l_end> 
 > > >,struct boost::mpl::l_iter<struct boost::mpl::l_end> > *)' marked 
as __forceinline not inlined

I'm not sure whether the Real Bug™ is in signals2 or in variant, but I 
don't think it's in any of my code since it doesn't name any of my types 
above that I can see.

I tried the big stick of setting all of Boost to "external" (and set the 
external warning level to 0), but sadly this did not suppress the warning.

Wrapping it in a #pragma suppression does hide the warning, which makes 
me sufficiently happy.  But perhaps someone might be interested to poke 
at it?
_______________________________________________
Boost-users mailing list
[email protected]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.