![]() And then there is a gray area in between. A generic vector container class is easily expressible, even with partial specialization for pointer types, while a function that sets up a graphical user interface based on an XML description given as a string is not expressible as a template. ![]() However, there are limitations: There are things that you can easily express with templates, and there are things that are impossible to express with templates. As such, templates are highly interesting to framework creators, and we do use advanced templates in many places in Qt. Templates are a builtin mechanism in C++ that allows the compiler to generate code on the fly, depending on the type of the arguments passed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |