Compilation error using VS.NET C++7.0

G

Guest

Hi,

I got compilation error: c:\gms\Services\DeviceManager\VCUE_Copy.h(134): warning C4346: 'MapType::value_type' : dependent name is not a type

for the following codes:

template <class MapType, class DestinationType = MapType::referent_type>
class MapCopy
{
public :
--->> typedef MapType::value_type source_type;

any suggestion? I am using VS.NET C++7.0
thanks
 
D

David Olsen

dt said:
I got compilation error: c:\gms\Services\DeviceManager\VCUE_Copy.h(134): warning C4346: 'MapType::value_type' : dependent name is not a type

for the following codes:

template <class MapType, class DestinationType = MapType::referent_type>
class MapCopy
{
public :
--->> typedef MapType::value_type source_type;

typedef typename MapType::value_type source_type;
any suggestion? I am using VS.NET C++7.0

Within a template definition, if a qualified name that depends on a
template parameter is supposed to refer to a type, the name must be
preceded by the keyword "typename".
 

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

Top