Hello
David,
Disclaimer:
I know nothing about VS .NET, C#, or other Microsoft things near
C++.
First, food
for thought. Might your compiler be complaining about multiple identical
(template) instantiations of the blitz::Vector<P_numtype> constructor, and
then eliminating all but one? Thus, a warning, then, a successful
link?
Second, class A doesn't look like standard C++ to me. Shouldn't
those arguments you're providing to the (B) data member be in a member
initializer list, rather than in the member declaration?
I.e.
class A
{
blitz::Array<double, 2> B;
public:
A() : B(2, 2, FortranArray<2>()) {}
void func();
}
Of course,
as you said, you could put B on the stack in func() to make this work
differently.
Vince
Virgilio
Hi,
Two questions.
I'm using VS.NET 2003
under W2K.
I think I've successfully installed and tested Blitz since all of
the testsuite programs run. But I get the following warning with almost every
compile in my own test program.
:\Blitz\blitz\vector.h(458) : warning C4521:
'blitz::Vector<P_numtype>' : multiple copy constructors
specified
with
[
P_numtype=int
]
C:\Blitz\blitz\vecpick.h(290) :
see reference to class template instantiation 'blitz::Vector<P_numtype>'
being compiled
with
[
P_numtype=int
]
C:\Blitz\blitz\vecpick.h(291) :
see reference to class template instantiation
'blitz::VectorPick<P_numtype>' being compiled
It seems to
run, but we try and eliminate all warnings in our code.
Second
question:
The following fails to compile:
class
A
{
public:
blitz::Array<double,2> B(2,2,FortranArray<2>()
);
void
func();
};
But if I move the Array definition into func(), it
compiles fine.
With the definition in the class definition it gives:
d:\Sindaworks\Code\SWBaseObjects\SWYsmpSolver.h(52) : error C2059: syntax
error : 'constant'
d:\Sindaworks\Code\SWBaseObjects\SWYsmpSolver.h(52) :
error C2059: syntax error :
')'
d:\Sindaworks\Code\SWBaseObjects\SWYsmpSolver.h(52) : error C2143: syntax
error : missing ')' before ';'
Why does it fail in the class
definition?
Thanks,
Dave
David Johnson
Cullimore and Ring Tech., Inc.
Voice:
303-471-9622
Fax: 303-971-0035
dave@crtech.com
http://www.crtech.com
Hot
engineering .... Cool software (tm)
.........................................................................