{"id":35633,"date":"2024-06-21T09:20:21","date_gmt":"2024-06-21T07:20:21","guid":{"rendered":"https:\/\/risc.web-email.at\/c-type-erasure-allows-the-creation-of-polymorphic-value-data-types-michael-hava-using-stdcpp-2024\/"},"modified":"2026-01-07T09:11:35","modified_gmt":"2026-01-07T08:11:35","slug":"c-type-erasure-allows-the-creation-of-polymorphic-value-data-types-michael-hava-using-stdcpp-2024","status":"publish","type":"post","link":"https:\/\/risc.web-email.at\/en\/c-type-erasure-allows-the-creation-of-polymorphic-value-data-types-michael-hava-using-stdcpp-2024\/","title":{"rendered":"C++ Type Erasure allows the creation of polymorphic value data types &#8211; Michael Hava using std::cpp 2024"},"content":{"rendered":"\n<p class=\"has-medium-font-size\">Michael Hava gave a presentation on C++ Type Erasure at the conference &#8220;using std::cpp 2024&#8221; from April 24-26 at the Universidad Carlos III de Madrid.<\/p>\n\n<p>Runtime polymorphism is realized in C++ with the virtual keyword. This approach requires the use of &#8220;reference semantics&#8221; and contradicts the concept of value semantics, which forms the basis for the STL. The &#8220;type erasure&#8221; idiom allows the creation of polymorphic value data types. Although there is no dedicated language support, it is an important tool for creating loosely coupled architectures and should be familiar to any advanced C++ developer. The talk presents the basic implementation techniques and discusses the use of type erasure in the standard library.    <\/p>\n\n<p>The whole lecture is available on YouTube:<\/p>\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"C++ Type Erasure - Michael Hava\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/CVjqmM8cbLc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<h3 class=\"wp-block-heading\">About Michael Hava<\/h3>\n\n\n\n<p><br\/>Michael Hava, Senior Software Developer and C++ expert at RISC Software GmbH, is part of the C++ standardization committee. He joined RISC Software in 2011 during his master studies at the University of Applied Sciences Upper Austria &#8211; Campus Hagenberg. Since then, he has promoted the introduction of modern C++ in various areas of engineering. With the aim of extending this promotion to education, he returned to his former university of applied sciences as a part-time lecturer in 2016. After attending his first C++ standardization meeting in 2019, he became a founding member of the Austrian C++ working group and serves as chair of the national committee. He remains in the LEWG most of the time and several of his papers are already accepted for C++26.     <\/p>\n\n\n\n<div class=\"wp-block-contact-form-7-contact-form-selector\">\n<div class=\"wpcf7 no-js\" id=\"wpcf7-f663-o1\" lang=\"en-US\" dir=\"ltr\" data-wpcf7-id=\"663\">\n<div class=\"screen-reader-response\"><p role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"><\/p> <ul><\/ul><\/div>\n<form action=\"\/en\/wp-json\/wp\/v2\/posts\/35633#wpcf7-f663-o1\" method=\"post\" class=\"wpcf7-form init\" aria-label=\"Contact form\" novalidate=\"novalidate\" data-status=\"init\">\n<fieldset class=\"hidden-fields-container\"><input type=\"hidden\" name=\"_wpcf7\" value=\"663\" \/><input type=\"hidden\" name=\"_wpcf7_version\" value=\"6.1.5\" \/><input type=\"hidden\" name=\"_wpcf7_locale\" value=\"en_US\" \/><input type=\"hidden\" name=\"_wpcf7_unit_tag\" value=\"wpcf7-f663-o1\" \/><input type=\"hidden\" name=\"_wpcf7_container_post\" value=\"0\" \/><input type=\"hidden\" name=\"_wpcf7_posted_data_hash\" value=\"\" \/>\n<\/fieldset>\n<div class=\"form-row\">\n\t<div class=\"form-input\">\n\t\t<p><label class=\"sr-only\" for=\"your-name\">Your name <\/label><br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"your-name\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text wpcf7-validates-as-required\" id=\"your-name\" aria-required=\"true\" aria-invalid=\"false\" placeholder=\"Name\" value=\"\" type=\"text\" name=\"your-name\" \/><\/span>\n\t\t<\/p>\n\t<\/div>\n\t<div class=\"form-input\">\n\t\t<p><label class=\"sr-only\" for=\"your-email\">Your email<\/label><br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"your-email\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-email wpcf7-validates-as-required wpcf7-text wpcf7-validates-as-email\" id=\"your-email\" aria-required=\"true\" aria-invalid=\"false\" placeholder=\"E-Mail\" value=\"\" type=\"email\" name=\"your-email\" \/><\/span>\n\t\t<\/p>\n\t<\/div>\n<\/div>\n<div class=\"form-row\">\n\t<div class=\"form-input\">\n\t\t<p><label class=\"sr-only\" for=\"your-company\">Company <\/label><br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"your-company\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text\" id=\"your-company\" aria-invalid=\"false\" placeholder=\"Unternehmen\" value=\"\" type=\"text\" name=\"your-company\" \/><\/span>\n\t\t<\/p>\n\t<\/div>\n\t<div class=\"form-input\">\n\t\t<p><label class=\"sr-only\" for=\"your-position\">Position<\/label><br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"your-position\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text\" aria-invalid=\"false\" placeholder=\"Position\" value=\"\" type=\"text\" name=\"your-position\" \/><\/span>\n\t\t<\/p>\n\t<\/div>\n<\/div>\n<div class=\"form-row\">\n\t<div class=\"form-input\">\n\t\t<p><label class=\"sr-only\" for=\"your-subject\"> Subject <\/label><br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"your-subject\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text wpcf7-validates-as-required\" id=\"your-subject\" aria-required=\"true\" aria-invalid=\"false\" placeholder=\"Thema\" value=\"\" type=\"text\" name=\"your-subject\" \/><\/span>\n\t\t<\/p>\n\t<\/div>\n<\/div>\n<p><span id=\"wpcf7-69de925917fc5-wrapper\" class=\"wpcf7-form-control-wrap phone-95-wrap\" style=\"display:none !important; visibility:hidden !important;\"><label for=\"wpcf7-69de925917fc5-field\" class=\"hp-message\">Please leave this field empty.<\/label><input id=\"wpcf7-69de925917fc5-field\"  class=\"wpcf7-form-control wpcf7-text\" type=\"text\" name=\"phone-95\" value=\"\" size=\"40\" tabindex=\"-1\" autocomplete=\"new-password\" \/><\/span><br \/>\n<label class=\"sr-only\" for=\"your-message\"> Your message (optional)<\/label><br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"your-message\"><textarea cols=\"40\" rows=\"10\" maxlength=\"2000\" class=\"wpcf7-form-control wpcf7-textarea\" id=\"your-message\" aria-invalid=\"false\" placeholder=\"Ihre Nachricht an uns\" name=\"your-message\"><\/textarea><\/span><br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"hcap-cf7\">\t\t<input\n\t\t\t\ttype=\"hidden\"\n\t\t\t\tclass=\"hcaptcha-widget-id\"\n\t\t\t\tname=\"hcaptcha-widget-id\"\n\t\t\t\tvalue=\"eyJzb3VyY2UiOlsiY29udGFjdC1mb3JtLTdcL3dwLWNvbnRhY3QtZm9ybS03LnBocCJdLCJmb3JtX2lkIjo0MzZ9-c5ba05e011699d70dda36bf3838d9e02\">\n\t\t\t\t<span id=\"hcap_cf7-69de9259186986.44991479\" class=\"wpcf7-form-control h-captcha \"\n\t\t\tdata-sitekey=\"3a6a81c1-2b2e-4b2a-b1eb-d9446bc09afb\"\n\t\t\tdata-theme=\"light\"\n\t\t\tdata-size=\"normal\"\n\t\t\tdata-auto=\"false\"\n\t\t\tdata-ajax=\"false\"\n\t\t\tdata-force=\"false\">\n\t\t<\/span>\n\t\t<input type=\"hidden\" id=\"_wpnonce\" name=\"_wpnonce\" value=\"c96e028190\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/en\/wp-json\/wp\/v2\/posts\/35633\" \/><\/span><input class=\"wpcf7-form-control wpcf7-submit has-spinner btn\" type=\"submit\" value=\"Senden\" \/>\n<\/p><div class=\"wpcf7-response-output\" aria-hidden=\"true\"><\/div>\n<\/form>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><div class=\"contact-person\">\n      <picture>\n      \n      \n      \n      \n      <img decoding=\"async\" data-aos=\"fade-zoom-in\"\n           data-aos-offset=\"0\" class=\"w-full\" width=\"212\" height=\"293\"\n           src=\"https:\/\/risc.web-email.at\/app\/uploads\/2023\/06\/mhava1-removebg-preview.png\"\n           alt=\"\">\n    <\/picture>\n    \n\n<h5 class=\"wp-block-heading\">Michael Florian Hava, MSc<\/h5>\n\n\n\n<p>Senior Software Architect<\/p>\n\n  <\/div>\n<\/div>\n<\/div>\n\n<h2 class=\"wp-block-heading\">Read more<\/h2>\n<div class=\"posts-slider-block\" data-aos=\"fade-up\" data-aos-offset=\"0\" data-aos-anchor-placement=\"top-bottom\">\n        <section class=\"splide posts-slider\" aria-label=\"Gallery Slides\">\n            <div class=\"splide__arrows\">\n                <button class=\"splide__arrow splide__arrow--prev\">\n                    <span class=\"sr-only\">Previous<\/span>\n                    <img decoding=\"async\" loading=\"lazy\" width=\"25\" height=\"21\" src=\"https:\/\/risc.web-email.at\/app\/themes\/risc-theme\/public\/images\/icon-arrow.35d2ec.svg\"\n                         alt=\"Previous\">\n                <\/button>\n                <button class=\"splide__arrow splide__arrow--next\">\n                    <span class=\"sr-only\">Next<\/span>\n                    <img decoding=\"async\" loading=\"lazy\" width=\"25\" height=\"21\" src=\"https:\/\/risc.web-email.at\/app\/themes\/risc-theme\/public\/images\/icon-arrow.35d2ec.svg\"\n                         alt=\"Next\">\n                <\/button>\n            <\/div>\n            <div class=\"inner\">\n                <div class=\"splide__track\">\n                    <div class=\"splide__list\">\n\n                                                    <a href=\"https:\/\/risc.web-email.at\/en\/technicalarticles\/technical-article-c20-concepts\/\" class=\"splide__slide blog-post-teaser mb-1 lg:mb-3\">\n                                <div class=\"blog-image\">\n                                                                                                                                <picture>\n                                                                                        <img decoding=\"async\" src=\"https:\/\/risc.web-email.at\/app\/uploads\/2023\/06\/iStock-464478994-360x214.jpg\"\n                                                 alt=\"C++20 Concepts (EN)\">\n                                        <\/picture>\n                                                                    <\/div>\n                                <div class=\"blog-content px-2 py-3 xl:px-4 xl:py-5\">\n                                    <h3>C++20 Concepts (EN)<\/h3>\n                                    <div class=\"blog-post-excerpt mt-2\">\n                                        A brief historical overview of the development of the programming language and the implementation of &quot;Templates&quot; and &quot;Concepts&quot;.\n                                    <\/div>\n                                    <span class=\"inline-block mt-2 more\">mehr erfahren <span class=\"ml-1 icon-more\"><\/span><\/span>\n\n                                <\/div>\n                            <\/a>\n                                                    <a href=\"https:\/\/risc.web-email.at\/en\/ahoi-c26\/\" class=\"splide__slide blog-post-teaser mb-1 lg:mb-3\">\n                                <div class=\"blog-image\">\n                                                                                                                                <picture>\n                                                                                        <img decoding=\"async\" src=\"https:\/\/risc.web-email.at\/app\/uploads\/2023\/09\/2023-06-26-Varna_5-360x214.jpeg\"\n                                                 alt=\"Ahoi C++26\">\n                                        <\/picture>\n                                                                    <\/div>\n                                <div class=\"blog-content px-2 py-3 xl:px-4 xl:py-5\">\n                                    <h3>Ahoi C++26<\/h3>\n                                    <div class=\"blog-post-excerpt mt-2\">\n                                        \n                                    <\/div>\n                                    <span class=\"inline-block mt-2 more\">mehr erfahren <span class=\"ml-1 icon-more\"><\/span><\/span>\n\n                                <\/div>\n                            <\/a>\n                                                    <a href=\"https:\/\/risc.web-email.at\/en\/c20-concepts-bringt-vernunft-in-die-generische-programmierung-michael-hava-beim-using-stdcpp-2023\/\" class=\"splide__slide blog-post-teaser mb-1 lg:mb-3\">\n                                <div class=\"blog-image\">\n                                                                                                                                <picture>\n                                                                                        <img decoding=\"async\" src=\"https:\/\/risc.web-email.at\/app\/uploads\/2023\/05\/2023-04-28_usingcpp-mhava-360x214.png\"\n                                                 alt=\"C++20 Concepts brings sanity to generic programming - Michael Hava on using std::cpp 2023\">\n                                        <\/picture>\n                                                                    <\/div>\n                                <div class=\"blog-content px-2 py-3 xl:px-4 xl:py-5\">\n                                    <h3>C++20 Concepts brings sanity to generic programming &#8211; Michael Hava on using std::cpp 2023<\/h3>\n                                    <div class=\"blog-post-excerpt mt-2\">\n                                        Michael Hava gave a presentation on C++ Concepts at the &quot;using std::cpp&quot; 2023 conference held April 27-28 at the Universidad Carlos III de Madrid.\n                                    <\/div>\n                                    <span class=\"inline-block mt-2 more\">mehr erfahren <span class=\"ml-1 icon-more\"><\/span><\/span>\n\n                                <\/div>\n                            <\/a>\n                                                    <a href=\"https:\/\/risc.web-email.at\/en\/c-big-in-japan-michael-hava-at-the-c26-committee-meeting\/\" class=\"splide__slide blog-post-teaser mb-1 lg:mb-3\">\n                                <div class=\"blog-image\">\n                                                                                                                                <picture>\n                                                                                        <img decoding=\"async\" src=\"https:\/\/risc.web-email.at\/app\/uploads\/2024\/03\/2024-03-28-Cpp-Japan1-360x214.jpg\"\n                                                 alt=\"C++, big in Japan - Michael Hava at the C++26 committee meeting\">\n                                        <\/picture>\n                                                                    <\/div>\n                                <div class=\"blog-content px-2 py-3 xl:px-4 xl:py-5\">\n                                    <h3>C++, big in Japan &#8211; Michael Hava at the C++26 committee meeting<\/h3>\n                                    <div class=\"blog-post-excerpt mt-2\">\n                                        The C++ committee met from March 18 to 23 in Tokyo and continued to work on features for C++26. Michael Hava is part of this committee and was there as usual. \n                                    <\/div>\n                                    <span class=\"inline-block mt-2 more\">mehr erfahren <span class=\"ml-1 icon-more\"><\/span><\/span>\n\n                                <\/div>\n                            <\/a>\n                                                    <a href=\"https:\/\/risc.web-email.at\/c23-finalisiert\/\" class=\"splide__slide blog-post-teaser mb-1 lg:mb-3\">\n                                <div class=\"blog-image\">\n                                                                                                                                <picture>\n                                                                                        <img decoding=\"async\" src=\"https:\/\/risc.web-email.at\/app\/uploads\/2023\/10\/2023-02-11-Issaquah3-1-360x214.jpg\"\n                                                 alt=\"C++23 finalisiert!\">\n                                        <\/picture>\n                                                                    <\/div>\n                                <div class=\"blog-content px-2 py-3 xl:px-4 xl:py-5\">\n                                    <h3>C++23 finalisiert!<\/h3>\n                                    <div class=\"blog-post-excerpt mt-2\">\n                                        Das ISO C++ Komitee traf sich vom 6. bis 11. Februar in Issaquah, Washington (USA) f\u00fcr finale Abstimmungen an C++23. Nach drei Jahren unter erschwerten Bedingungen wurde der neuste C++ Standard plan- und fristgerecht verabschiedet.\n                                    <\/div>\n                                    <span class=\"inline-block mt-2 more\">mehr erfahren <span class=\"ml-1 icon-more\"><\/span><\/span>\n\n                                <\/div>\n                            <\/a>\n                                                    <a href=\"https:\/\/risc.web-email.at\/aloha-again-michael-hava-beim-c-komitee-meeting-in-hawaii\/\" class=\"splide__slide blog-post-teaser mb-1 lg:mb-3\">\n                                <div class=\"blog-image\">\n                                                                                                                                <picture>\n                                                                                        <img decoding=\"async\" src=\"https:\/\/risc.web-email.at\/app\/uploads\/2023\/11\/2023-11-CPP-Hawaii_2-360x214.png\"\n                                                 alt=\"Aloha again: Michael Hava beim C++-Komitee-Meeting in Hawaii\">\n                                        <\/picture>\n                                                                    <\/div>\n                                <div class=\"blog-content px-2 py-3 xl:px-4 xl:py-5\">\n                                    <h3>Aloha again: Michael Hava beim C++-Komitee-Meeting in Hawaii<\/h3>\n                                    <div class=\"blog-post-excerpt mt-2\">\n                                        Von 6. bis 11. November 2023 fand in Kona, Hawaii (USA) ein Face-to-Face-Meeting des C++ Komitees statt. Michael Hava, Senior Software Developer und C++-Koryph\u00e4e der RISC Software GmbH, ist Teil dieses Komitees und nahm daher an diesem Meeting teil. \n                                    <\/div>\n                                    <span class=\"inline-block mt-2 more\">mehr erfahren <span class=\"ml-1 icon-more\"><\/span><\/span>\n\n                                <\/div>\n                            <\/a>\n                                                    <a href=\"https:\/\/risc.web-email.at\/aloha-c-michael-hava-beim-komitee-meeting-in-hawaii\/\" class=\"splide__slide blog-post-teaser mb-1 lg:mb-3\">\n                                <div class=\"blog-image\">\n                                                                                                                                <picture>\n                                                                                        <img decoding=\"async\" src=\"https:\/\/risc.web-email.at\/app\/uploads\/2023\/11\/2022-11-7-WG21_F2FKona_4-360x214.jpg\"\n                                                 alt=\"Aloha C++: Michael Hava beim Komitee-Meeting in Hawaii\">\n                                        <\/picture>\n                                                                    <\/div>\n                                <div class=\"blog-content px-2 py-3 xl:px-4 xl:py-5\">\n                                    <h3>Aloha C++: Michael Hava beim Komitee-Meeting in Hawaii<\/h3>\n                                    <div class=\"blog-post-excerpt mt-2\">\n                                        Beim Face-to-Face-Meeting in Hawaii Anfang November lief f\u00fcr Michael Hava nicht alles wie geplant und trotzdem besser als gedacht.\n                                    <\/div>\n                                    <span class=\"inline-block mt-2 more\">mehr erfahren <span class=\"ml-1 icon-more\"><\/span><\/span>\n\n                                <\/div>\n                            <\/a>\n                                            <\/div>\n                <\/div>\n            <\/div>\n        <\/section>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Michael Hava gave a presentation on C++ Type Erasure at the conference &#8220;using std::cpp 2024&#8221; from April 24-26 at the Universidad Carlos III de Madrid.<\/p>\n","protected":false},"author":2,"featured_media":31544,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[29],"tags":[],"class_list":["post-35633","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news-en"],"acf":[],"portrait_thumb_url":"https:\/\/risc.web-email.at\/app\/uploads\/2024\/06\/using_std_cpp2024-360x214.png","category_name":"News","watermark":null,"_links":{"self":[{"href":"https:\/\/risc.web-email.at\/en\/wp-json\/wp\/v2\/posts\/35633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/risc.web-email.at\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/risc.web-email.at\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/risc.web-email.at\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/risc.web-email.at\/en\/wp-json\/wp\/v2\/comments?post=35633"}],"version-history":[{"count":1,"href":"https:\/\/risc.web-email.at\/en\/wp-json\/wp\/v2\/posts\/35633\/revisions"}],"predecessor-version":[{"id":35634,"href":"https:\/\/risc.web-email.at\/en\/wp-json\/wp\/v2\/posts\/35633\/revisions\/35634"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/risc.web-email.at\/en\/wp-json\/wp\/v2\/media\/31544"}],"wp:attachment":[{"href":"https:\/\/risc.web-email.at\/en\/wp-json\/wp\/v2\/media?parent=35633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/risc.web-email.at\/en\/wp-json\/wp\/v2\/categories?post=35633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/risc.web-email.at\/en\/wp-json\/wp\/v2\/tags?post=35633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}