![]() |
Blitz Support : |
From: Virgilio, Vincent (Vincent.Virgilio_at_[hidden])
Date: 2004-01-12 08:30:16
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
-----Original Message-----
From: blitz-support-bounces_at_[hidden]
[mailto:blitz-support-bounces_at_[hidden]] On Behalf Of David Johnson
Sent: Friday, January 09, 2004 3:23 PM
To: blitz-support_at_[hidden]
Subject: [Blitz-support] VS .NET questions
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_at_[hidden]
http://www.crtech.com
<http://www.crtech.com/> Hot engineering .... Cool software (tm)
........................................................................
.
************************************
This email and any files transmitted with it are proprietary and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email
in error please notify the sender. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of ITT Industries, Inc.
The recipient should check this email and any attachments for the presence of viruses. ITT Industries accepts no liability for any damage caused by any virus transmitted by this
email.
************************************