CPPDebuggerVisualizers icon indicating copy to clipboard operation
CPPDebuggerVisualizers copied to clipboard

boost::intrusive::list visualizer doesn't work if list's size is not constant size

Open CzB404 opened this issue 2 years ago • 0 comments

boost::intrusive::list can be set to omit the constant time size_ field in root_plus_size_ with boost::intrusive::constant_time_size<false> supplied as a template parameter.

The current visualizer implementation fails to load with "Natvis: [redacted]\boost\natvis\boost_IntrusiveContainers.natvis(47,2): Ignoring visualizer for type 'boost::intrusive::list_impl<boost::intrusive::bhtraits<[redacted],[redacted],unsigned __int64,0,[redacted]>' labeled as 'boost::intrusive::list_impl<boost::intrusive::bhtraits<*,*>,*>' because one or more sub-expressions was invalid."

The expressions containing data_.root_plus_size_.size_ were the cause of the problem, removing them made the visualizer work again.

boost::intrusive::constant_time_size<false> can be detected by taking into consideration the bool ConstantTimeSize parameter in the template parameters of boost::intrusive::list_impl.

The Boost version that was used is 1.72.0.

CzB404 avatar Aug 21 '23 13:08 CzB404