Opened 9 years ago

Closed 9 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:

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@… 9 years ago.
patch that fixes the bug

Download all attachments as: .zip

Change History (3)

by alex@…, 9 years ago

Attachment: boost-unordered-patch.diff added

patch that fixes the bug

comment:1 by Daniel James, 9 years ago

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

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

comment:2 by Daniel James, 9 years ago

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.

Note: See TracTickets for help on using tickets.