Ticket #8851 (closed Bugs: fixed)

Opened 2 years ago

Last modified 2 years ago

unused variable warning in opt builds

Reported by: alex@… Owned by: danieljames
Milestone: To Be Determined Component: unordered
Version: Boost 1.53.0 Severity: Problem
Keywords: Cc:


The following snippet from table.hpp:456 fails my opt build with unused variable warnings, treated as errors:

        void swap_allocators(table& other, false_type)
            // According to, if propagate_on_container_swap is
            // false the behaviour is undefined unless the allocators
            // are equal.
            BOOST_ASSERT(node_alloc() == other.node_alloc());

Seems that BOOST_ASSERT is compiled away in opt builds. Easy fix, patch included.


boost-unordered-patch.diff Download (526 bytes) - added by alex@… 2 years ago.
patch that fixes the bug

Change History

Changed 2 years ago by alex@…

patch that fixes the bug

comment:1 Changed 2 years ago by danieljames

(In [85244]) Fix unused variable warning. Refs #8851.

Bit annoying that boost::ignore_unused_variable_warning is in <boost/concept_check.hpp>.

comment:2 Changed 2 years ago by danieljames

  • Status changed from new to closed
  • Resolution set to fixed

(In [85388]) Merge unordered to release. Fixes #8851, #8874

Avoid some warnings, and move detail functions into a sub-namespace to avoid exposing them via. ADL.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.