CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Template<>

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 20, 2010, 03:29
Default Template<>
  #1
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 322
Rep Power: 8
ata is on a distinguished road
Hi FOAMers
In some files of OpenFOAM are templates without parameters, template<> and not template<class T>for example. An example is Scaler.H in $/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/primitives/Scalar
Can any one tell me what is this for?
Any help will be appreciated.
Best regards

Ata
ata is offline   Reply With Quote

Old   April 20, 2010, 05:46
Default
  #2
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 369
Rep Power: 13
l_r_mcglashan will become famous soon enough
Have a look here:

http://www.cplusplus.com/doc/tutorial/templates/

what you're looking for is explained under template specialisation. Hope it helps.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   April 20, 2010, 08:31
Default Thanks
  #3
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 322
Rep Power: 8
ata is on a distinguished road
Hi Laurence R. McGlashan
I hope you are well. Thank you very very much for your response.
Best regards

Ata
ata is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 16:46.