Hi,
I'm trying to use Boost and find that my program doesn't compile in AIX
with VisualAge C++ 6. I tried to simulate the problem by writing a
simple program (see below) and find that it also didn't compile. The
error was "non-type template parameter must be constant integral
expression" in the line "A<fa;". Is this a bug in VisualAge C++ 6? Is
there any patch available? Thanks.
CM
#include <stdio.h>
template<bool x>
class A
{
public:
void print()
{
printf("%d\n",x);
}
};
template<int n>
class B
{
public:
static const bool f=true;
A<fa;
void print()
{
a.print();
printf("%d\n", n);
}
};
int main()
{
B<34b;
b.print();
} 5 1483
<cm*****@yahoo.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
I'm trying to use Boost and find that my program doesn't compile in AIX
with VisualAge C++ 6. I tried to simulate the problem by writing a
simple program (see below) and find that it also didn't compile. The
error was "non-type template parameter must be constant integral
expression" in the line "A<fa;". Is this a bug in VisualAge C++ 6? Is
there any patch available? Thanks.
V6 isn't nearly sturdy enough to support most of Boost. (We got things like
regex working for char, but that took some effort.) In particular, you can't
write things like:
static const bool f = true;
at least not all in one line. You have to write:
static const bool f;
and then, outside the class, provide the initializer for it. But it's still
not
usable as a constant integer expression. OTOH:
A<truea;
ought to work fine. I suspect, however, that you will find many more
problems with Boost code under V6.
BTW, this is not a "bug" in V6. Rather, it's a change in the language
that happened while the C++ Standard was still evolving. V6 froze
partway through the standardization process.
HTH,
P.J. Plauger
Dinkumware, Ltd. http://www.dinkumware.com
P.J. Plauger wrote:
<cm*****@yahoo.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
I'm trying to use Boost and find that my program doesn't compile in AIX
with VisualAge C++ 6. I tried to simulate the problem by writing a
simple program (see below) and find that it also didn't compile. The
error was "non-type template parameter must be constant integral
expression" in the line "A<fa;". Is this a bug in VisualAge C++ 6? Is
there any patch available? Thanks.
V6 isn't nearly sturdy enough to support most of Boost. (We got things like
regex working for char, but that took some effort.) In particular, you can't
write things like:
static const bool f = true;
at least not all in one line. You have to write:
static const bool f;
and then, outside the class, provide the initializer for it. But it's still
not
usable as a constant integer expression. OTOH:
A<truea;
ought to work fine. I suspect, however, that you will find many more
problems with Boost code under V6.
BTW, this is not a "bug" in V6. Rather, it's a change in the language
that happened while the C++ Standard was still evolving. V6 froze
partway through the standardization process.
Really? Isn't version 6 the latest version of VisualAge C++ for AIX?
It was released in 2004, I believe.
<jj*****@yahoo.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
P.J. Plauger wrote:
><cm*****@yahoo.comwrote in message news:11**********************@e3g2000cwe.googlegr oups.com...
I'm trying to use Boost and find that my program doesn't compile in AIX
with VisualAge C++ 6. I tried to simulate the problem by writing a
simple program (see below) and find that it also didn't compile. The
error was "non-type template parameter must be constant integral
expression" in the line "A<fa;". Is this a bug in VisualAge C++ 6? Is
there any patch available? Thanks.
V6 isn't nearly sturdy enough to support most of Boost. (We got things like regex working for char, but that took some effort.) In particular, you can't write things like:
static const bool f = true;
at least not all in one line. You have to write:
static const bool f;
and then, outside the class, provide the initializer for it. But it's still not usable as a constant integer expression. OTOH:
A<truea;
ought to work fine. I suspect, however, that you will find many more problems with Boost code under V6.
BTW, this is not a "bug" in V6. Rather, it's a change in the language that happened while the C++ Standard was still evolving. V6 froze partway through the standardization process.
Really? Isn't version 6 the latest version of VisualAge C++ for AIX?
It was released in 2004, I believe.
Duh. I was confusing Visual C++ (Microsoft) with Visual Age (IBM).
Never mind.
P.J. Plauger
Dinkumware, Ltd. http://www.dinkumware.com
Anyway, thanks for all the comments. After some hard work, I figured
out that the mentioned problem doesn't exist in the version 6.0.0.10
which is a bit older than the one I'm using (6.0.0.13). So my only
solution maybe to downgrade to that version.
CM
P.J. Plauger ¼g¹D¡G
<jj*****@yahoo.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
P.J. Plauger wrote:
<cm*****@yahoo.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
I'm trying to use Boost and find that my program doesn't compile in AIX
with VisualAge C++ 6. I tried to simulate the problem by writing a
simple program (see below) and find that it also didn't compile. The
error was "non-type template parameter must be constant integral
expression" in the line "A<fa;". Is this a bug in VisualAge C++ 6?Is
there any patch available? Thanks.
V6 isn't nearly sturdy enough to support most of Boost. (We got things
like
regex working for char, but that took some effort.) In particular, you
can't
write things like:
static const bool f = true;
at least not all in one line. You have to write:
static const bool f;
and then, outside the class, provide the initializer for it. But it's
still
not
usable as a constant integer expression. OTOH:
A<truea;
ought to work fine. I suspect, however, that you will find many more
problems with Boost code under V6.
BTW, this is not a "bug" in V6. Rather, it's a change in the language
that happened while the C++ Standard was still evolving. V6 froze
partway through the standardization process.
Really? Isn't version 6 the latest version of VisualAge C++ for AIX?
It was released in 2004, I believe.
Duh. I was confusing Visual C++ (Microsoft) with Visual Age (IBM).
Never mind.
P.J. Plauger
Dinkumware, Ltd. http://www.dinkumware.com
The problem is solved by applying the following patch: http://www-1.ibm.com/support/docview...=utf-8&lang=en cm*****@yahoo.com ¼g¹D¡G
Anyway, thanks for all the comments. After some hard work, I figured
out that the mentioned problem doesn't exist in the version 6.0.0.10
which is a bit older than the one I'm using (6.0.0.13). So my only
solution maybe to downgrade to that version.
CM
P.J. Plauger ¼g¹D¡G
<jj*****@yahoo.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
P.J. Plauger wrote:
><cm*****@yahoo.comwrote in message
>news:11**********************@e3g2000cwe.googlegr oups.com...
>>
I'm trying to use Boost and find that my program doesn't compile in AIX
with VisualAge C++ 6. I tried to simulate the problem by writing a
simple program (see below) and find that it also didn't compile. The
error was "non-type template parameter must be constant integral
expression" in the line "A<fa;". Is this a bug in VisualAge C++ 6? Is
there any patch available? Thanks.
>>
>V6 isn't nearly sturdy enough to support most of Boost. (We got things
>like
>regex working for char, but that took some effort.) In particular, you
>can't
>write things like:
>>
>static const bool f = true;
>>
>at least not all in one line. You have to write:
>>
>static const bool f;
>>
>and then, outside the class, provide the initializer for it. But it's
>still
>not
>usable as a constant integer expression. OTOH:
>>
>A<truea;
>>
>ought to work fine. I suspect, however, that you will find many more
>problems with Boost code under V6.
>>
>BTW, this is not a "bug" in V6. Rather, it's a change in the language
>that happened while the C++ Standard was still evolving. V6 froze
>partway through the standardization process.
>>
>
Really? Isn't version 6 the latest version of VisualAge C++ for AIX?
It was released in 2004, I believe.
Duh. I was confusing Visual C++ (Microsoft) with Visual Age (IBM).
Never mind.
P.J. Plauger
Dinkumware, Ltd. http://www.dinkumware.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Joe M Blow |
last post by:
I have the CD for the listed above...
Willing to sell Copies, with instructions (how to use cd) not the java code
but will provide manuals on java code
perfect for any beginner
send...
|
by: John A. Parker |
last post by:
Good afternoon.
We're in a bind due to our Actuate product upgrade requiring an obsolete version
(v5.0.2.x) of "VisualAge C++ Professional for AIX". (The only alternative we
have would be for us...
|
by: Scott Nesbitt |
last post by:
The following code cores on AIX 4.3.3 w/ VisualAge 5.0.2 and AIX 5.1
with VisualAge 6.0, but works fine on HP/UX, Solaris, and Linux.
#include <iostream>
#include <vector>
typedef struct...
|
by: Ulrich Heinen |
last post by:
Hello,
I'm having trouble with a template member function in a non template class.
The attached sample program compiles and works just fine with GCC or IBM
VisualAge compilers but Sun Workshop 6...
|
by: Steve |
last post by:
Hi,
We have software built on USL and are migrating to IBM VisualAge STL.
Can someone tell me the major difference between the two? Is the "Block" in
USL the same as "vector" in STL?
Thanks,...
|
by: PG |
last post by:
Hi gurus,
I have AIX visual age C++ compiler version 5.0.2.3. I have a simple
hello world program that gives compilation errors. Any help will be
appreciated. Thanks
PG
***test.cpp****
...
|
by: Rhino |
last post by:
Is there any way to install the IBM Distributed Debugger V9.2 on Windows XP
without first uninstalling DB2?
I installed the IBM Distributed Debugger V9.2 on my Windows XP box in the
hopes of...
|
by: Amber |
last post by:
I write a very simple cpp file, but visualage faild to produce the
output:
#include <iostream>
using namespace std;
int main(){
cout<<"hello world"<<endl;
return 0;
}
cc a.cpp:
|
by: snowfall |
last post by:
Can we create Webservice using VisualAge for Java (VAJ) V 3.5, which uses Websphere Appln server 3.5 Advanced edition??
TIA
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |