id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11722,boost::lockfree should use BOOST_LIKELY/UNLIKELY macros instead of defining likely/unlikely as inline fns,Sampath Tilakumara ,timblechmann,"Currently boost::lockfree defines unlikely/unlikely inline functions in branch_hints.hpp. This name is generic and causes conflicts with other (external) libs which also defines likely/unlikely. (linux kernel also defines them the same). boost already has macros defined for this as BOOST_LIKELY/UNLIKELY in boost/config.hpp, and lockfree should use these to avoid conflicts and to be consistent. The following changes were done in boost_1_58_0, and tested to avoid a conflict case. {{{ * Comment out the following lines: (not required; those files don’t use likely/unlikely) detail/tagged_ptr_dcas.hpp:#include detail/tagged_ptr_ptrcompression.hpp:#include * Replace the following include line with “#include // for BOOST_LIKELY” spsc_queue.hpp:#include * Add “#include // for BOOST_LIKELY” to queue.hpp * Change the following likely/unlikely to BOOST_LIKELY/BOOST_UNLIKELY queue.hpp: using detail::likely; queue.hpp: if (likely(tail == tail2)) { queue.hpp: using detail::likely; queue.hpp: if (likely(head == head2)) { spsc_queue.hpp: while (unlikely(ret >= max_size)) * note that this makes the branch_hints.hpp redundant. }}}",Bugs,closed,To Be Determined,lockfree,Boost 1.58.0,Problem,fixed,"likely, BOOST_LIKELY",