Modify

Ticket #8851 (closed Bugs: fixed)

Opened 9 months ago

Last modified 8 months 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:

Description

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 23.2.1.8, 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.

Attachments

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

Change History

Changed 9 months ago by alex@…

patch that fixes the bug

comment:1 Changed 9 months 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 8 months 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.

View

Add a comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.