{"doi":"10.1002/9781119421276.ch12","title":"Writing Generic Code with Templates","abstract":null,"journal":"Professional C++","year":2018,"id":600486,"datarank":0.0,"base_score":0.0,"endowment":0.0,"self_citation_contribution":0.0,"citation_network_contribution":0.0,"self_endowment_contribution":0.0,"citer_contribution":0.0,"corpus_percentile":null,"corpus_rank":null,"citation_count":0,"citer_count":0,"citers_with_citation_signal":0,"citers_with_endowment":0,"datacite_reuse_total":0,"is_dataset":false,"is_dataset_confidence":null,"is_data_producer":false,"deposit_databanks":null,"is_oa":false,"file_count":0,"downloads":0,"has_version_chain":false,"published_date":null,"fair_score":null,"fair_percentile":null,"algorithm_id":"datarank_citation_only_1hop_v6","ranking_scope":"data_only","authors":[],"reference_count":0,"raw_metadata":{"has_enrichment":true,"resolved":true,"title":"Writing Generic Code with Templates","abstract":"C++ provides language support not only for object-oriented programming, but also for generic programming. The goal of generic programming is to write reusable code.The fundamental tools for generic programming in C++ are templates. This chapter starts with a discussion on using templates for generic programming. It then describes the syntax on how to write templates and examples where templates are really useful. It explains how to write class templates, how to organize the code in different files, how to use template parameters, and how to templatize methods of a class. It further discusses how to use class template specialization to write special implementations of a template where the template parameters are replaced with specific arguments. In order to understand class templates, it is helpful to examine the syntax. The chapter finishes with an explanation of function templates and variable templates.","is_dataset_classified":null,"base_score":0.0,"endowment":0.0,"datacite_reuse_total":0,"file_count":0,"downloads":0,"views":0,"has_version_chain":false,"is_dataset":false,"is_oa":false,"pmid":"23304386","pmcid":null,"openalex_id":"https://openalex.org/W4234406076","authors":[],"funders":[],"total_grants":0,"fwci":null,"citation_percentile":null,"influential_citations":0,"citation_trend":[],"oa_status":"closed","license":"http://doi.wiley.com/10.1002/tdm_license_1.1","oa_locations":[{"url":"https://api.wiley.com/onlinelibrary/tdm/v1/articles/10.1002%2F9781119421276.ch12","host_type":"publisher"},{"url":"https://onlinelibrary.wiley.com/doi/pdf/10.1002/9781119421276.ch12","host_type":"publisher"},{"url":"https://doi.org/10.1002/9781119421276.ch12","host_type":""}],"fields_of_study":["Advanced Software Engineering Methodologies","Model-Driven Software Engineering Techniques","Distributed and Parallel Computing Systems"],"mesh_terms":[],"keywords":["Template","Computer science","Programming language","Syntax","Class (philosophy)","Generic programming","Code (set theory)","Object-oriented programming","Artificial intelligence","Set (abstract data type)"],"sdg_mappings":[{"sdg_number":0,"sdg_label":"Quality Education"}],"linked_datasets":[],"clinical_trials":[],"software_tools":[],"database_accessions":[],"source":"live","citation_network_status":"fetched"},"created_at":"2026-07-29T13:17:09.491526Z","pmid":null,"pmcid":null,"fwci":null,"citation_percentile":null,"influential_citations":0,"oa_status":null,"license":null,"views":0,"total_file_size_bytes":0,"version_count":0,"fair_f":null,"fair_a":null,"fair_i":null,"fair_r":null,"fair_zscore":null,"fair_rationale":null,"fair_model":null,"fair_agent_version":null,"fair_fulltext_source":null,"fair_has_llm":null,"fair_computed_at":null,"clinical_trials":[],"software_tools":[],"db_accessions":[],"linked_datasets":[],"topics":[]}