Skip Nav
Home » Forums » SystemC Forum

Icon - KMLM List KMLM List

View email archives for the history of this mailing list.

List Home All Archives Dates Threads Authors Subjects
systemc-forum - size of systemC data type Message Thread: Previous | Next
  • To: tlm2_forum@xxxxxxxxxxxxxxxxx, systemc-forum@xxxxxxxxxxxxxxxxx
  • From: yoman yoman <saynotosystemc@xxxxxxxxx>
  • Date: Mon, 31 Jan 2011 10:00:11 +0530
Send Email to
Send new message
Reply to this message
I have recieved a class  which I cannot modify and is defined as :

template <typename a, int b> class X{

where b should be sizeof(a). I have to instantiate that particular class in
my own class as :

template <typename a> class Y {
X<a, sizeof(a)> obj;

int main(){
Y<sc_biguint<128> > obj;

sizeof(systemC-data-type) does not work properly and sizeof operator cannot
be overloaded.

To solve this issue I can use template specialization but that will be a big
overhead as I have to manage all C++/systemC datatype.

Please specify if there is any simpler solution / trick  possible.

Thanks in advance

By Date: Previous | Next Current Thread By Thread: Previous | Next