This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29518] New: incorrect "
- From: "wb at fnal dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Oct 2006 21:16:40 -0000
- Subject: [Bug c++/29518] New: incorrect "
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Regression from gcc 3.4.4; under gcc 4.1.1 it produces the diagnostic "error:
'N<int>::okay' is not a valid template argument for type 'bool' because it is a
non-constant expression" -- and I am informed (by gdr) that the bug is still
present in gcc 4.2.0.
The code below makes use of the Boost library; I can also provide the
preprocessed version of the same code, if requested, but it's on the order of
1000 lines long:
#include "boost/mpl/assert.hpp"
template< class T >
struct N
{
static bool const okay = true;
BOOST_MPL_ASSERT_MSG( okay, message_goes_here, (T) );
};
int
main()
{
N<int> n;
}
--
Summary: incorrect "
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wb at fnal dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29518