Modify

Opened 4 years ago

Closed 4 years ago

#8851 closed Bugs (fixed)

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 (1)

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

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by alex@…

patch that fixes the bug

comment:1 Changed 4 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 4 years ago by danieljames

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

(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 Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain danieljames.
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.