* Weird g++ error with current 3.4 CVS
@ 2004-08-16 19:48 Richard Guenther
2004-08-16 20:04 ` Richard Guenther
0 siblings, 1 reply; 2+ messages in thread
From: Richard Guenther @ 2004-08-16 19:48 UTC (permalink / raw)
To: gcc
Since a g++ rebuild of todays CVS I get the following weird error from
compiling the POOMA library:
/net/alwazn/home/rguenth/src/pooma-bk/r2/src/Domain/SliceDomain.h: In
method `SliceDomain<DomainTraits<SliceRange<2,1> > >::SliceDomain(const
SliceDomain<DomainTraits<SliceRange<2,1> > > &)':
/net/alwazn/home/rguenth/src/pooma-bk/r2/src/Domain/SliceRange.h:121:
instantiated from `SliceRange<2,1>::SliceRange(const SliceRange<2,1> &)'
/net/alwazn/home/rguenth/src/pooma-bk/r2/src/Engine/BrickBase.cpp:301:
instantiated from `Pooma::DoubleSliceHelper<1,2>::init(Interval<1> &,
int *, int &, const Pooma::BrickViewBase<2> &, const SliceInterval<2,1> &)'
src/Engine/BrickBase3.cmpl.cpp:38: instantiated from here
/net/alwazn/home/rguenth/src/pooma-bk/r2/src/Domain/SliceDomain.h:156:
non-constant `operator <=<DomainTraits<SliceRange<2,1> >::{anonymous
enum}>((+&sliceDimensions), (+&dimensions))' cannot be used as template
argument
where it is moaning about the CTAssert in
// copy constructor
SliceDomain(const SliceDomain<DT> &sd)
: slice_m(sd.slice_m),
domain_m(sd.domain_m) {
CTAssert(DT::sliceDimensions <= DT::dimensions);
for (int d = 0; d < DT::dimensions; ++d)
ignore_m[d] = sd.ignore_m[d];
}
where CTAssert is defined in the usual way
#define CTAssert(c) PoomaCTAssert<(c)>::test()
template<bool B> struct PoomaCTAssert {};
template<> struct PoomaCTAssert<true> { static void test() {} };
and DT::sliceDimensions and DT::dimensions are anonymouns enum entries.
It seems DT::sliceDimensions <= DT::dimensions is treated as method
reference somehow, is this correct or even standard conform?
g++-3.4 (GCC) 3.4.2 20040816 (prerelease)
Richard.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Weird g++ error with current 3.4 CVS
2004-08-16 19:48 Weird g++ error with current 3.4 CVS Richard Guenther
@ 2004-08-16 20:04 ` Richard Guenther
0 siblings, 0 replies; 2+ messages in thread
From: Richard Guenther @ 2004-08-16 20:04 UTC (permalink / raw)
Cc: gcc
Whoops, sorry. A g++ 2.95 slipped under my mpiCC.
Richard.
Richard Guenther wrote:
> Since a g++ rebuild of todays CVS I get the following weird error from
> compiling the POOMA library:
>
> /net/alwazn/home/rguenth/src/pooma-bk/r2/src/Domain/SliceDomain.h: In
> method `SliceDomain<DomainTraits<SliceRange<2,1> > >::SliceDomain(const
> SliceDomain<DomainTraits<SliceRange<2,1> > > &)':
> /net/alwazn/home/rguenth/src/pooma-bk/r2/src/Domain/SliceRange.h:121:
> instantiated from `SliceRange<2,1>::SliceRange(const SliceRange<2,1> &)'
> /net/alwazn/home/rguenth/src/pooma-bk/r2/src/Engine/BrickBase.cpp:301:
> instantiated from `Pooma::DoubleSliceHelper<1,2>::init(Interval<1> &,
> int *, int &, const Pooma::BrickViewBase<2> &, const SliceInterval<2,1> &)'
> src/Engine/BrickBase3.cmpl.cpp:38: instantiated from here
> /net/alwazn/home/rguenth/src/pooma-bk/r2/src/Domain/SliceDomain.h:156:
> non-constant `operator <=<DomainTraits<SliceRange<2,1> >::{anonymous
> enum}>((+&sliceDimensions), (+&dimensions))' cannot be used as template
> argument
>
> where it is moaning about the CTAssert in
>
> // copy constructor
> SliceDomain(const SliceDomain<DT> &sd)
> : slice_m(sd.slice_m),
> domain_m(sd.domain_m) {
> CTAssert(DT::sliceDimensions <= DT::dimensions);
> for (int d = 0; d < DT::dimensions; ++d)
> ignore_m[d] = sd.ignore_m[d];
> }
>
> where CTAssert is defined in the usual way
>
> #define CTAssert(c) PoomaCTAssert<(c)>::test()
>
> template<bool B> struct PoomaCTAssert {};
>
> template<> struct PoomaCTAssert<true> { static void test() {} };
>
> and DT::sliceDimensions and DT::dimensions are anonymouns enum entries.
> It seems DT::sliceDimensions <= DT::dimensions is treated as method
> reference somehow, is this correct or even standard conform?
>
> g++-3.4 (GCC) 3.4.2 20040816 (prerelease)
>
> Richard.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-08-16 19:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-16 19:48 Weird g++ error with current 3.4 CVS Richard Guenther
2004-08-16 20:04 ` Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).