Subject: [Boost-bugs] [Boost C++ Libraries] #8844: [PATCH] arg.hpp should use BOOST_STATIC_ASSERT
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-18 07:49:19
#8844: [PATCH] arg.hpp should use BOOST_STATIC_ASSERT
------------------------------+---------------------
Reporter: pmachata@⦠| Owner: pdimov
Type: Patches | Status: new
Milestone: To Be Determined | Component: bind
Version: Boost 1.54.0 | Severity: Problem
Keywords: |
------------------------------+---------------------
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.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8844> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC