TY - JOUR AU - Zólyomi, I AU - Porkoláb, Zoltán TI - Towards a general template introspection library JF - LECTURE NOTES IN COMPUTER SCIENCE J2 - LNCS VL - 3286 PY - 2004 SP - 266 EP - 282 PG - 17 SN - 0302-9743 DO - 10.1007/978-3-540-30175-2_14 UR - https://m2.mtmt.hu/api/publication/2743876 ID - 2743876 N1 - WoS:hiba:000225162800014 2019-03-08 05:16 típus nem egyezik AB - To ensure the correctness of template based constructions in C++, constraints on template parameters are especially useful. Unlike other languages (Ada, Eiffel, etc.), C++ does not directly support checking requirements on template parameters (i.e., concept checking). However, many articles introduce ad hoc solutions based on special language features. In this paper we propose a structure for a general introspection library which supports easy expression and combination of basic orthogonal requirements, providing the possibility to avoid reimplementation of simple checks for every similar concept. Based on these building blocks, it is possible to express highly complex constraints on template parameters, contrary to languages having builtin support for a limited set of constraints only. Our library enables a checking method that takes the advantages of previous solutions, such as REQUIRE-like macros and static interfaces. Our implementation is non-intrusive, relies only on standard C++ language features and results no runtime over-head. © Springer-Verlag 2004. LA - English DB - MTMT ER - TY - JOUR AU - Zólyomi, I AU - Porkoláb, Zoltán AU - Kozsik, Tamás TI - An extension to the subtype relationship in C++ implemented with template metaprogramming JF - LECTURE NOTES IN COMPUTER SCIENCE J2 - LNCS VL - 2830 PY - 2003 SP - 209 EP - 227 PG - 19 SN - 0302-9743 DO - 10.1007/978-3-540-39815-8_13 UR - https://m2.mtmt.hu/api/publication/2395314 ID - 2395314 AB - Families of independent classes, where each class represents a separate, orthogonal concern are highly attractive for implementing collaboration-based design. However, required subtype relationship between such families cannot be expressed in many programming languages. This paper presents a framework to handle collaborating groups of classes using template metaprogramming based on standard C++ features in the style of Loki::Typelist. Our solution provides tailor-made implicit conversion rules between appropriate groups, inclusion polymorphism and a tool for dynamic binding. © Springer-Verlag Berlin Heidelberg 2003. LA - English DB - MTMT ER -