S
saksenaabhishek
Hi Guys,
I have some problem in compiling the following code, specially with
MSVC++.Net2003 (Code works fine with GCC compiler)
=========================================
template< typename PROTOCOL>
class portublic smart::smart_port<
typename PROTOCOL::transport:utput::type,
typename PROTOCOL::transport::input::type >
{
private:
/* Handy typedefs*/
typedef port<PROTOCOL> my_type;
typedef typename PROTOCOL::transport::input::type input_interface;
typedef typename PROTOCOL::transport:utput::type
output_interface;
typedef smart::smart_port<
output_interface,
input_interface
port(my_type& port_,unsigned int id=0):
base_port_type(sc_gen_unique_name ("port"),
port_,id),
view(this)
{
}
port(base_port_type& port,unsigned int id=0):
base_port_type(sc_gen_unique_name ("port"),port,id),
view(this)
{
}
};
========================================
MS compiler complians about error C2942: 'pse:ort<PROTOCOL>' :
template-class-id redefined as a formal argument of a function
This error appears at the second constructor i.e. line containing code
"port(base_port_type& port,unsigned int id=0):"
Do you have any clue about the problem and how it can be sloved.
AS
I have some problem in compiling the following code, specially with
MSVC++.Net2003 (Code works fine with GCC compiler)
=========================================
template< typename PROTOCOL>
class portublic smart::smart_port<
typename PROTOCOL::transport:utput::type,
typename PROTOCOL::transport::input::type >
{
private:
/* Handy typedefs*/
typedef port<PROTOCOL> my_type;
typedef typename PROTOCOL::transport::input::type input_interface;
typedef typename PROTOCOL::transport:utput::type
output_interface;
typedef smart::smart_port<
output_interface,
input_interface
base_port_type;
port(my_type& port_,unsigned int id=0):
base_port_type(sc_gen_unique_name ("port"),
port_,id),
view(this)
{
}
port(base_port_type& port,unsigned int id=0):
base_port_type(sc_gen_unique_name ("port"),port,id),
view(this)
{
}
};
========================================
MS compiler complians about error C2942: 'pse:ort<PROTOCOL>' :
template-class-id redefined as a formal argument of a function
This error appears at the second constructor i.e. line containing code
"port(base_port_type& port,unsigned int id=0):"
Do you have any clue about the problem and how it can be sloved.
AS