I have a tiny question, probably an easy one, but I couldn’t found googling it. I am working on some code that has something like that:
Inserter::Inserter(const data::Set& set){
produces<Info>();
}
I don’t quite understand what produces means or I am doing something wrong. Here is my interpretation, PLEASE correct me if I am said something wrong:
I had a class Inserter that had an Inserter object, calling from a constant of the object set of class data. Then I produces another object called Info.
am I right?. Please I need some help!!!
Generics 🙂
Aka “templates”
Kind of 🙂
You have a class “Inserter”.
It’s constructor uses a template class “producer”. You instantiate an “Info” kind of “producer”.
Here’s a good tutorial on templates:
http://www.cplusplus.com/doc/tutorial/templates/