Opened 9 years ago

Closed 9 years ago

#8844 closed Patches (fixed)

[PATCH] arg.hpp should use BOOST_STATIC_ASSERT

Reported by: pmachata@… Owned by: Peter Dimov
Milestone: To Be Determined Component: bind
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

template <int I> template<class T> boost::arg<I>::arg<T> (T &) contains code equivalent to BOOST_STATIC_ASSERT:

        // static assert I == is_placeholder<T>::value
        typedef char T_must_be_placeholder[ I == is_placeholder<T>::value? 1: -1 ];

GCC recently added a warning for this unused typedef case. This can be worked around by adding attribute ((unused)), but why not simply use BOOST_STATIC_ASSERT?

Test suite passes.

Attachments (1)

boost-1.54.0-bind-static_assert.patch (633 bytes ) - added by pmachata@… 9 years ago.
A fix

Download all attachments as: .zip

Change History (3)

by pmachata@…, 9 years ago

A fix

comment:1 by Chris Stylianou <chris5287@…>, 9 years ago

I'm also experiencing this warning, the attached 'boost-1.54.0-bind-static_assert.patch' does fix it.

comment:2 by Peter Dimov, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.