HELP : visualC++ with STL roguewave => errorC2079(first' uses undefined class...

A

akira2x3x

Hello,

I get this error while compiling with visualc++ and STL roguewave. With
STL microsoft everything work fine.

XXXData.cpp
f:\xxxxx\product\rw\rcb1.2.0\rm\include\rw\_pair.h(63) : error C2079:
'first' uses undefined class 'Node'
f:\xxxxx\product\rw\rcb1.2.0\rm\include\vector(404) : see
reference to class template instantiation 'std::pair<class Node,bool>'
being compiled
f:\xxxxxx\indexedvector.hpp(175) :
see reference to class template instantiation 'std::vector<struct
std::pair said:
>' being compiled
f:\xxxxxx\node.hpp(147) :
see reference to class template instantiation 'xxx::IndexedVector<class
Node>' being compiled
Generating Code...
Error executing cl.exe.
=================================================
in f:\xxxxxx\indexedvector.hpp(175) : code is

static vector <pair <T, bool> > make_data (const vector <T>&
data);

// Data Members for Class Attributes
vector <pair <T, bool> > _data;
==================================================
What I understand as it's not possible to compile with visual c++ and
using roguewave STL this kind of code =>

class Tempo
{
...
std::vector<std::pair<Tempo,bool>> _data;

}

thanks
 
I

Ian Collins

Hello,

I get this error while compiling with visualc++ and STL roguewave. With
STL microsoft everything work fine.
Post a complete example that shows your problem and someone might be
able to tell you what's wrong.
 
A

akira2x3x

In fact the pb is due to this code => with visual c++ and using
roguewave STL this kind of code bellow gives an
f:\xxxxx\product\rw\rcb1.2.0\rm\include\rw\_pair.h(63) : error C2079:
'first' uses undefined class 'Tempo'.

With STL microsoft no problem. Unfortunately I must use roguewave STL.

class Tempo
{
...
std::vector<std::pair<Tempo,bool>> _data;

}
 
I

Ian Collins

In fact the pb is due to this code => with visual c++ and using
roguewave STL this kind of code bellow gives an
f:\xxxxx\product\rw\rcb1.2.0\rm\include\rw\_pair.h(63) : error C2079:
'first' uses undefined class 'Tempo'.

With STL microsoft no problem. Unfortunately I must use roguewave STL.

class Tempo
{
...
std::vector<std::pair<Tempo,bool>> _data;

}
So you are storing a class that contains a vector in a vector? Lucky
for you it doesn't compile!
 
J

Jonathan Mcdougall

What I understand as it's not possible to compile with visual c++ and
using roguewave STL this kind of code =>

class Tempo
{
...
std::vector<std::pair<Tempo,bool>> _data;

}

Think: Tempo contains a vector of Tempos. Each of these tempos contain
a vector of Tempos. Each of these tempos then contain a vector of
Tempos... Where do we stop?

Either rethink your design or store pointers to dynamically allocated
Tempos. That way, you'll only have the Tempos you need.


Jonathan
 
A

akira2x3x

? your answers are welcomed anyway....It is compiling/working without
problem using STL microsoft instead of STL Roguewave.


The idea is recursivity and I must reused existing code using Roguewave
:-(
 
J

Jonathan Mcdougall

Jonathan Mcdougall wrote

? your answers are welcomed anyway....It is compiling/working without
problem using STL microsoft instead of STL Roguewave.


The idea is recursivity and I must reused existing code using Roguewave

Actually, my answer was plain wrong, just forget it. This:

# include <vector>
# include <utility>

class B
{
std::vector<std::pair<B, bool> > v;
};

compiles fine and looks good.

Perhaps if you post the exact code that fails to compile we'll be able
to help you.


Jonathan
 
A

akira2x3x

Thanks Jonathan,

But are you using RogueWave STL? for me your code does
the same error with visual C++ and STL roguewave.
 
M

Marcus Kwok

I get this error while compiling with visualc++ and STL roguewave. With
STL microsoft everything work fine.

What version of VC++? VC++ 6.0 has poor template support. If you are
using VC++ 6.0, try upgrading your compiler.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top