Boost logo

Boost :

From: Ivan Matek (libbooze_at_[hidden])
Date: 2025-04-30 11:35:34


Hello,
I just started with review and I have a cluster of questions, but it is not
clear what the root cause of my issues is so apologies if ordering of
questions is wrong.

   1. I wanted to get hash map stats, but they are not printed in debug
   policy, even when env variable is set, I must hack release policy like
   this:
   - vptr_vector<release>,
   vectored_error_handler<release>> {};
   + vptr_vector<release>,
   vectored_error_handler<release>, basic_trace_output<release>> {}
   Is this expected? IDK why debug prints some trace, but not hash info

   2. While playing with this I get crashes when I just c/p release policy
   and rename it, e.g.
   +struct my_release : basic_policy<
   + my_release, std_rtti,
   fast_perfect_hash<my_release>,
   + vptr_vector<my_release>,
   vectored_error_handler<my_release>> {};
   crashes
   in
   template<bool Indirect>
   inline auto box_vptr(const vptr_type& vp) {
       if constexpr (Indirect) {
           return &vp;
       } else {
           return vp;
       }
   }
   but when I switch

   boost::openmethod::initialize<boost::openmethod::policies::my_release>();
   to

   boost::openmethod::initialize<boost::openmethod::policies::release>();

   it works fine.
   It also exibits some other weird behavior, e.g. if I switch debug
   inheritance from release to my_release crash goes away, even when not using
   debug...

Looks to me I am doing something that is not allowed, but it is not clear
what I am doing wrong.

regards,
Ivan




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk