The attached patch gets rid of these annoying gcc 4.8 compiler warnings
pointing to boost (usued typedefs etc.). I have collected the fixed both
from boost itself [1] and from the patchset used by Fedora for their boost
RPMs [2].

I propose to commit this to 2.2-staging. The compiler noise is really
annoying. An alternative is an update of our boost sources. These warnings
are fixed upstream meanwhile.

Jürgen

[1] https://svn.boost.org/trac/boost/changeset/82886
[2]
http://www.rpmseek.com/download/http://ftp.halifax.rwth-aachen.de//fedora/linux/updates/19/SRPMS/boost-1.53.0-14.fc19.src.rpm?hl=de&nid=15509:593
diff --git a/boost/boost/concept/detail/general.hpp 
b/boost/boost/concept/detail/general.hpp
index e3014c1..56d816d 100644
--- a/boost/boost/concept/detail/general.hpp
+++ b/boost/boost/concept/detail/general.hpp
@@ -6,6 +6,7 @@
 
 # include <boost/preprocessor/cat.hpp>
 # include <boost/concept/detail/backward_compatibility.hpp>
+# include <boost/static_assert.hpp>
 
 # ifdef BOOST_OLD_CONCEPT_SUPPORT
 #  include <boost/concept/detail/has_constraints.hpp>
@@ -68,7 +69,8 @@ struct requirement_<void(*)(Model)>
 #  define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr )             \
     typedef ::boost::concepts::detail::instantiate<          \
     &::boost::concepts::requirement_<ModelFnPtr>::failed>    \
-      BOOST_PP_CAT(boost_concept_check,__LINE__)
+      BOOST_PP_CAT(boost_concept_check,__LINE__)            \
+      BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE
 
 }}
 
diff --git a/boost/boost/lexical_cast.hpp b/boost/boost/lexical_cast.hpp
index 94dbaf9..c27dc5e 100644
--- a/boost/boost/lexical_cast.hpp
+++ b/boost/boost/lexical_cast.hpp
@@ -865,7 +865,6 @@ namespace boost {
 #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
             BOOST_STATIC_ASSERT(!std::numeric_limits<T>::is_signed);
 #endif
-            typedef typename Traits::int_type int_type;
             CharT const czero = lcast_char_constants<CharT>::zero;
             --end;
             value = 0;
diff --git a/boost/boost/math/special_functions/fpclassify.hpp 
b/boost/boost/math/special_functions/fpclassify.hpp
index a71ae36..847193d 100644
--- a/boost/boost/math/special_functions/fpclassify.hpp
+++ b/boost/boost/math/special_functions/fpclassify.hpp
@@ -327,7 +327,6 @@ inline bool (isfinite)(T x)
 { //!< \brief return true if floating-point type t is finite.
    typedef typename detail::fp_traits<T>::type traits;
    typedef typename traits::method method;
-   typedef typename boost::is_floating_point<T>::type fp_tag;
    typedef typename tools::promote_args<T>::type value_type;
    return detail::isfinite_impl(static_cast<value_type>(x), method());
 }
@@ -338,7 +337,6 @@ inline bool (isfinite)(long double x)
 { //!< \brief return true if floating-point type t is finite.
    typedef detail::fp_traits<long double>::type traits;
    typedef traits::method method;
-   typedef boost::is_floating_point<long double>::type fp_tag;
    typedef long double value_type;
    return detail::isfinite_impl(static_cast<value_type>(x), method());
 }
@@ -398,7 +396,6 @@ inline bool (isnormal)(T x)
 {
    typedef typename detail::fp_traits<T>::type traits;
    typedef typename traits::method method;
-   typedef typename boost::is_floating_point<T>::type fp_tag;
    typedef typename tools::promote_args<T>::type value_type;
    return detail::isnormal_impl(static_cast<value_type>(x), method());
 }
@@ -409,7 +406,6 @@ inline bool (isnormal)(long double x)
 {
    typedef detail::fp_traits<long double>::type traits;
    typedef traits::method method;
-   typedef boost::is_floating_point<long double>::type fp_tag;
    typedef long double value_type;
    return detail::isnormal_impl(static_cast<value_type>(x), method());
 }
@@ -487,7 +483,6 @@ inline bool (isinf)(T x)
 {
    typedef typename detail::fp_traits<T>::type traits;
    typedef typename traits::method method;
-   typedef typename boost::is_floating_point<T>::type fp_tag;
    typedef typename tools::promote_args<T>::type value_type;
    return detail::isinf_impl(static_cast<value_type>(x), method());
 }
@@ -498,7 +493,6 @@ inline bool (isinf)(long double x)
 {
    typedef detail::fp_traits<long double>::type traits;
    typedef traits::method method;
-   typedef boost::is_floating_point<long double>::type fp_tag;
    typedef long double value_type;
    return detail::isinf_impl(static_cast<value_type>(x), method());
 }
@@ -570,7 +564,6 @@ inline bool (isnan)(T x)
 { //!< \brief return true if floating-point type t is NaN (Not A Number).
    typedef typename detail::fp_traits<T>::type traits;
    typedef typename traits::method method;
-   typedef typename boost::is_floating_point<T>::type fp_tag;
    return detail::isnan_impl(x, method());
 }
 
diff --git a/boost/boost/math/special_functions/sign.hpp 
b/boost/boost/math/special_functions/sign.hpp
index 6de88b2..feab787 100644
--- a/boost/boost/math/special_functions/sign.hpp
+++ b/boost/boost/math/special_functions/sign.hpp
@@ -110,7 +110,6 @@ template<class T> int (signbit)(T x)
 { 
    typedef typename detail::fp_traits<T>::type traits;
    typedef typename traits::method method;
-   typedef typename boost::is_floating_point<T>::type fp_tag;
    return detail::signbit_impl(x, method());
 }
 
@@ -124,7 +123,6 @@ template<class T> T (changesign)(const T& x)
 { //!< \brief return unchanged binary pattern of x, except for change of sign 
bit. 
    typedef typename detail::fp_traits<T>::sign_change_type traits;
    typedef typename traits::method method;
-   typedef typename boost::is_floating_point<T>::type fp_tag;
 
    return detail::changesign_impl(x, method());
 }
diff --git a/boost/boost/regex/icu.hpp b/boost/boost/regex/icu.hpp
index 772806e..07c72cd 100644
--- a/boost/boost/regex/icu.hpp
+++ b/boost/boost/regex/icu.hpp
@@ -423,7 +423,6 @@ bool do_regex_match(BidiIterator first, BidiIterator last,
 {
    typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;
    typedef match_results<conv_type>                   match_type;
-   typedef typename match_type::allocator_type        alloc_type;
    match_type what;
    bool result = ::boost::regex_match(conv_type(first, first, last), 
conv_type(last, first, last), what, e, flags);
    // copy results across to m:
@@ -439,7 +438,6 @@ bool do_regex_match(BidiIterator first, BidiIterator last,
 {
    typedef u8_to_u32_iterator<BidiIterator, UChar32>  conv_type;
    typedef match_results<conv_type>                   match_type;
-   typedef typename match_type::allocator_type        alloc_type;
    match_type what;
    bool result = ::boost::regex_match(conv_type(first, first, last), 
conv_type(last, first, last), what, e, flags);
    // copy results across to m:
@@ -598,7 +596,6 @@ bool do_regex_search(BidiIterator first, BidiIterator last,
 {
    typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;
    typedef match_results<conv_type>                   match_type;
-   typedef typename match_type::allocator_type        alloc_type;
    match_type what;
    bool result = ::boost::regex_search(conv_type(first, first, last), 
conv_type(last, first, last), what, e, flags, conv_type(base));
    // copy results across to m:
@@ -615,7 +612,6 @@ bool do_regex_search(BidiIterator first, BidiIterator last,
 {
    typedef u8_to_u32_iterator<BidiIterator, UChar32>  conv_type;
    typedef match_results<conv_type>                   match_type;
-   typedef typename match_type::allocator_type        alloc_type;
    match_type what;
    bool result = ::boost::regex_search(conv_type(first, first, last), 
conv_type(last, first, last), what, e, flags, conv_type(base));
    // copy results across to m:
diff --git a/boost/boost/regex/v4/regex_format.hpp 
b/boost/boost/regex/v4/regex_format.hpp
index 3b1d19d..2c321a7 100644
--- a/boost/boost/regex/v4/regex_format.hpp
+++ b/boost/boost/regex/v4/regex_format.hpp
@@ -1064,7 +1064,6 @@ struct format_functor_c_string
    template <class OutputIter>
    OutputIter operator()(const Match& m, OutputIter i, 
boost::regex_constants::match_flag_type f, const Traits& t = Traits())
    {
-      typedef typename Match::char_type char_type;
       const charT* end = func;
       while(*end) ++end;
       return regex_format_imp(i, m, func, end, f, t);
@@ -1083,7 +1082,6 @@ struct format_functor_container
    template <class OutputIter>
    OutputIter operator()(const Match& m, OutputIter i, 
boost::regex_constants::match_flag_type f, const Traits& t = Traits())
    {
-      typedef typename Match::char_type char_type;
       return re_detail::regex_format_imp(i, m, func.begin(), func.end(), f, t);
    }
 private:
diff --git a/boost/boost/regex/v4/regex_split.hpp 
b/boost/boost/regex/v4/regex_split.hpp
index a7ae350..dc3e43e 100644
--- a/boost/boost/regex/v4/regex_split.hpp
+++ b/boost/boost/regex/v4/regex_split.hpp
@@ -107,7 +107,6 @@ std::size_t regex_split(OutputIterator out,
                    std::size_t max_split)
 {
    typedef typename std::basic_string<charT, Traits1, Alloc1>::const_iterator  
ci_t;
-   typedef typename match_results<ci_t>::allocator_type                        
match_allocator;
    ci_t last = s.begin();
    std::size_t init_size = max_split;
    re_detail::split_pred<OutputIterator, charT, Traits1, Alloc1> pred(&last, 
&out, &max_split);
diff --git a/boost/boost/static_assert.hpp b/boost/boost/static_assert.hpp
index 0bc3ef6..d11411a 100644
--- a/boost/boost/static_assert.hpp
+++ b/boost/boost/static_assert.hpp
@@ -18,9 +18,13 @@
 #include <boost/detail/workaround.hpp>
 
 #ifndef BOOST_NO_CXX11_STATIC_ASSERT
-#  define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert(B, Msg)
+#  ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+#     define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
+#  else
+#     define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
+#  endif
 #else
-#  define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
+#     define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
 #endif
 
 #ifdef __BORLANDC__
@@ -39,13 +43,33 @@
 // then enable this:
 //
 #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && 
(__GNUC_MINOR__ >= 4)))
-#  define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) == 0 ? false : true)
+#  ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+#     define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) ((__VA_ARGS__) == 0 ? false 
: true)
+#  else
+#     define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) == 0 ? false : true)
+#  endif
 #else
-#  define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x)
+#  ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+#     define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) (bool)(__VA_ARGS__)
+#  else
+#     define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x)
+#  endif
+#endif
+//
+// If the compiler warns about unused typedefs then enable this:
+//
+#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && 
(__GNUC_MINOR__ >= 7)))
+#  define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused))
+#else
+#  define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE
 #endif
 
 #ifndef BOOST_NO_CXX11_STATIC_ASSERT
-#  define BOOST_STATIC_ASSERT( B ) static_assert(B, #B)
+#  ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+#     define BOOST_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, 
#__VA_ARGS__)
+#  else
+#     define BOOST_STATIC_ASSERT( B ) static_assert(B, #B)
+#  endif
 #else
 
 namespace boost{
@@ -119,17 +143,29 @@ template<int x> struct static_assert_test{};
        sizeof(::boost::STATIC_ASSERTION_FAILURE< 
BOOST_STATIC_ASSERT_BOOL_CAST( B ) >) )
 #else
 // generic version
-#define BOOST_STATIC_ASSERT( B ) \
-   typedef ::boost::static_assert_test<\
-      sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( 
B ) >)>\
-         BOOST_JOIN(boost_static_assert_typedef_, __LINE__)
+#  ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+#     define BOOST_STATIC_ASSERT( ... ) \
+         typedef ::boost::static_assert_test<\
+            sizeof(::boost::STATIC_ASSERTION_FAILURE< 
BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\
+               BOOST_JOIN(boost_static_assert_typedef_, __LINE__) 
BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE
+#  else
+#     define BOOST_STATIC_ASSERT( B ) \
+         typedef ::boost::static_assert_test<\
+            sizeof(::boost::STATIC_ASSERTION_FAILURE< 
BOOST_STATIC_ASSERT_BOOL_CAST( B ) >)>\
+               BOOST_JOIN(boost_static_assert_typedef_, __LINE__) 
BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE
+#  endif
 #endif
 
 #else
 // alternative enum based implementation:
-#define BOOST_STATIC_ASSERT( B ) \
-   enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
-      = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) }
+#  ifndef BOOST_NO_CXX11_VARIADIC_MACROS
+#    define BOOST_STATIC_ASSERT( ... ) \
+         enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
+            = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( __VA_ARGS__ ) 
>) }
+#  else
+         enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
+            = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) }
+#  endif
 #endif
 #endif // defined(BOOST_NO_CXX11_STATIC_ASSERT)
 
diff --git a/boost/boost/tuple/detail/tuple_basic.hpp 
b/boost/boost/tuple/detail/tuple_basic.hpp
index 88f0d90..5f3c78f 100644
--- a/boost/boost/tuple/detail/tuple_basic.hpp
+++ b/boost/boost/tuple/detail/tuple_basic.hpp
@@ -225,7 +225,6 @@ inline typename access_traits<
 get(const cons<HT, TT>& c BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) {
   typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
       apply<cons<HT, TT> > impl;
-  typedef BOOST_DEDUCED_TYPENAME impl::type cons_element;
   return impl::call(c).head;
 }
 

Reply via email to