Opened 4 years ago

Closed 4 years ago

#8851 closed Bugs (fixed)

unused variable warning in opt builds

Reported by: alex@… Owned by: Daniel James
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.

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@…

Attachment: boost-unordered-patch.diff added

patch that fixes the bug

comment:1 Changed 4 years ago by Daniel James

(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 Daniel James

Resolution: fixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Daniel James.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.