Subject: [Boost-bugs] [Boost C++ Libraries] #1734: BOOST_STATIC_WARNING can't be passed a dependent expression
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-03-30 17:42:39
#1734: BOOST_STATIC_WARNING can't be passed a dependent expression
--------------------------+-------------------------------------------------
Reporter: dave | Owner: ramey
Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: serialization
Version: Boost 1.35.0 | Severity: Problem
Keywords: |
--------------------------+-------------------------------------------------
This breaks Boost.Serialization on conforming compilers like Intel/Linux.
{{{
#!cpp
#include "boost/static_warning.hpp"
template <class T>
int f()
{
BOOST_STATIC_WARNING(T::value);
return 0;
}
struct A{ enum { value = true }; };
int x = f<A>();
}}}
The problem is that there's a missing {{{typename}}} in the code generated
by the macro:
{{{
#!cpp
template <class T>
int f()
{
struct STATIC_WARNING7 { ::boost::static_warning_impl<(bool)( T::value
)> ::type* p; void f() { delete p; } };
// ---------------------^ HERE
return 0;
}
}}}
I think there are tricks that can help you get around this requirement
(ask Daniel Wallin what he did in the Parameter library), but in the
meantime BOOST_STATIC_WARNING should at least be made into a no-op for
Intel C++. That is enough to get the library working on one additional
platform and might even be an acceptable change for 1.35.0
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1734>
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:49:57 UTC