{"id":685,"date":"2014-05-30T18:23:23","date_gmt":"2014-05-30T18:23:23","guid":{"rendered":"http:\/\/blog.wholetomato.com\/?p=685"},"modified":"2022-06-22T19:03:26","modified_gmt":"2022-06-22T23:03:26","slug":"automatically-add-c11-override","status":"publish","type":"post","link":"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/","title":{"rendered":"Automatically add C++11 override to virtual methods"},"content":{"rendered":"<p>The C++11 standard has been approved and C++14 is around the corner. These\u00a0new standards define a lot of interesting language features, one of them being support for the\u00a0override identifier. You can append &#8220;override&#8221; to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class. If the virtual method does not exist in the base class, or has a different signature, the compiler raises an error and the compilation fails.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideexample.png?ssl=1\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"662\" data-permalink=\"https:\/\/www.wholetomato.com\/blog\/blogoverrideexample\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideexample.png?fit=487%2C100&amp;ssl=1\" data-orig-size=\"487,100\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"blogOverrideExample\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideexample.png?fit=300%2C62&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideexample.png?fit=487%2C100&amp;ssl=1\" class=\"alignnone size-full wp-image-662\" src=\"https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideexample.png?resize=487%2C100&#038;ssl=1\" alt=\"blogOverrideExample\" width=\"487\" height=\"100\" srcset=\"https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideexample.png?w=487&amp;ssl=1 487w, https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideexample.png?resize=300%2C62&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideexample.png?resize=360%2C74&amp;ssl=1 360w\" sizes=\"auto, (max-width: 487px) 100vw, 487px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Use of override\u00a0is very useful for detecting errors, at compile time, caused by typos and bad\u00a0copy-pastes.<\/p>\n<p>Visual Studio has supported override since Visual Studio 2010, and so has Visual Assist. But if you want Visual Assist to insert &#8220;override&#8221; automatically\u2014when using the code generation feature <a href=\"http:\/\/docs.wholetomato.com\/default.asp?W165\">Implement Virtual Methods<\/a>\u2014you need to tell it via the Windows Registry.<\/p>\n<p><em>Note: Beginning with Visual Assist build 2042, you can insert &#8220;override&#8221; automatically via the options dialog of\u00a0Visual Assist. The following instructions apply to build 2036 and older.<\/em><\/p>\n<p>Exit your IDE(s) so Visual Assist does not overwrite your changes, then using the registry editor, navigate to this key:<\/p>\n<p>HKEY_CURRENT_USER\\Software\\Whole Tomato\\Visual Assist X\\<a href=\"http:\/\/docs.wholetomato.com\/default.asp?W407\">&lt;IDE_SPEC&gt;<\/a><\/p>\n<p>Change the value of\u00a0UseOverrideKeywordInImplementInterface from 00 to 01.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideregistry.png?ssl=1\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"663\" data-permalink=\"https:\/\/www.wholetomato.com\/blog\/blogoverrideregistry\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideregistry.png?fit=750%2C300&amp;ssl=1\" data-orig-size=\"750,300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"blogOverrideRegistry\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideregistry.png?fit=300%2C120&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideregistry.png?fit=750%2C300&amp;ssl=1\" class=\"alignnone size-full wp-image-663\" src=\"https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideregistry.png?resize=660%2C264&#038;ssl=1\" alt=\"blogOverrideRegistry\" width=\"660\" height=\"264\" srcset=\"https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideregistry.png?w=750&amp;ssl=1 750w, https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideregistry.png?resize=300%2C120&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2014\/05\/blogoverrideregistry.png?resize=360%2C144&amp;ssl=1 360w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Restart you IDE, and from now on,\u00a0Visual Assist will append override to\u00a0the signatures of your\u00a0virtual methods.<\/p>\n<p><em>This article was contributed by\u00a0Manuel Maier,\u00a0student at\u00a0Hochschule der Medien Stuttgart, Germany.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The C++11 standard has been approved and C++14 is around the corner. These\u00a0new standards define a lot of interesting language features, one of them being support for the\u00a0override identifier. You can append &#8220;override&#8221; to a&#8230;<\/p>\n","protected":false},"author":66190671,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[672],"tags":[],"class_list":["post-685","post","type-post","status-publish","format-standard","hentry","category-tips-and-tricks"],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfpLS4-b3","aioseo_head":"\n\t\t<!-- All in One SEO Pro 4.9.6.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"The C++11 standard has been approved and C++14 is around the corner. These new standards define a lot of interesting language features, one of them being support for the override identifier. You can append &quot;override&quot; to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class.\" \/>\n\t<meta name=\"robots\" content=\"max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"Guest Contributor\"\/>\n\t<meta name=\"google-site-verification\" content=\"DtHrwoEjg0KG_fbuPSp5j_wNIf-g5hSh4EH6tZBoCIw\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO Pro (AIOSEO) 4.9.6.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Tomato Soup - Visual Assist Team Blog\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Automatically add C++11 override to virtual methods - Tomato Soup\" \/>\n\t\t<meta property=\"og:description\" content=\"The C++11 standard has been approved and C++14 is around the corner. These new standards define a lot of interesting language features, one of them being support for the override identifier. You can append &quot;override&quot; to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2014-05-30T18:23:23+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-06-22T23:03:26+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wholetomatosoftware\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@visualassist\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Automatically add C++11 override to virtual methods - Tomato Soup\" \/>\n\t\t<meta name=\"twitter:description\" content=\"The C++11 standard has been approved and C++14 is around the corner. These new standards define a lot of interesting language features, one of them being support for the override identifier. You can append &quot;override&quot; to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class.\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@visualassist\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/automatically-add-c11-override\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/category\\\/tips-and-tricks\\\/#listItem\",\"name\":\"Tips and Tricks\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/category\\\/tips-and-tricks\\\/#listItem\",\"position\":2,\"name\":\"Tips and Tricks\",\"item\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/category\\\/tips-and-tricks\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/automatically-add-c11-override\\\/#listItem\",\"name\":\"Automatically add C++11 override to virtual methods\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/automatically-add-c11-override\\\/#listItem\",\"position\":3,\"name\":\"Automatically add C++11 override to virtual methods\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/category\\\/tips-and-tricks\\\/#listItem\",\"name\":\"Tips and Tricks\"}}]},{\"@type\":\"FAQPage\",\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/automatically-add-c11-override\\\/#aioseo-faq-page-64c3be728b790\",\"name\":\"Automatically add C++11 override to virtual methods\",\"description\":\"The C++11 standard has been approved and C++14 is around the corner. These\\u00a0new standards define a lot of interesting language features, one of them being support for the\\u00a0override identifier. You can append \\\"override\\\" to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class.\",\"url\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/automatically-add-c11-override\\\/\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\"How to automatically add C++11 override to virtual methods?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"The C++11 standard has been approved and C++14 is around the corner. These\\u00a0new standards define a lot of interesting language features, one of them being support for the\\u00a0override identifier. You can append \\\"override\\\" to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class. If the virtual method does not exist in the base class, or has a different signature, the compiler raises an error and the compilation fails.\\n\\nUse of override\\u00a0is very useful for detecting errors, at compile time, caused by typos and bad\\u00a0copy-pastes.\\n\\nVisual Studio has supported override since Visual Studio 2010, and so has Visual Assist. But if you want Visual Assist to insert \\\"override\\\" automatically\\u2014when using the code generation feature Implement Virtual Methods\\u2014you need to tell it via the Windows Registry.\"}}],\"inLanguage\":\"en-US\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/automatically-add-c11-override\\\/#breadcrumblist\"}},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/#organization\",\"name\":\"Tomato Soup\",\"description\":\"Visual Assist Team Blog\",\"url\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/\",\"email\":\"info@wholetomato.com\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":0,\"maxValue\":100},\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.wholetomato.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/wt-logo.jpg?fit=400%2C400&ssl=1\",\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/automatically-add-c11-override\\\/#organizationLogo\",\"width\":400,\"height\":400},\"image\":{\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/automatically-add-c11-override\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/wholetomatosoftware\",\"https:\\\/\\\/twitter.com\\\/visualassist\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/Wholetomatosoftware\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/whole-tomato-software\"]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/\",\"name\":\"Tomato Soup\",\"description\":\"Visual Assist Team Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.wholetomato.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO Pro -->\r\n\t\t<title>Automatically add C++11 override to virtual methods - Tomato Soup<\/title>\n\n","aioseo_head_json":{"title":"Automatically add C++11 override to virtual methods - Tomato Soup","description":"The C++11 standard has been approved and C++14 is around the corner. These new standards define a lot of interesting language features, one of them being support for the override identifier. You can append \"override\" to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class.","canonical_url":"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/","robots":"max-snippet:-1, max-image-preview:large, max-video-preview:-1","keywords":"","webmasterTools":{"google-site-verification":"DtHrwoEjg0KG_fbuPSp5j_wNIf-g5hSh4EH6tZBoCIw","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.wholetomato.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.wholetomato.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.wholetomato.com\/blog\/category\/tips-and-tricks\/#listItem","name":"Tips and Tricks"}},{"@type":"ListItem","@id":"https:\/\/www.wholetomato.com\/blog\/category\/tips-and-tricks\/#listItem","position":2,"name":"Tips and Tricks","item":"https:\/\/www.wholetomato.com\/blog\/category\/tips-and-tricks\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/#listItem","name":"Automatically add C++11 override to virtual methods"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.wholetomato.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/#listItem","position":3,"name":"Automatically add C++11 override to virtual methods","previousItem":{"@type":"ListItem","@id":"https:\/\/www.wholetomato.com\/blog\/category\/tips-and-tricks\/#listItem","name":"Tips and Tricks"}}]},{"@type":"FAQPage","@id":"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/#aioseo-faq-page-64c3be728b790","name":"Automatically add C++11 override to virtual methods","description":"The C++11 standard has been approved and C++14 is around the corner. These\u00a0new standards define a lot of interesting language features, one of them being support for the\u00a0override identifier. You can append \"override\" to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class.","url":"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/","mainEntity":[{"@type":"Question","name":"How to automatically add C++11 override to virtual methods?","acceptedAnswer":{"@type":"Answer","text":"The C++11 standard has been approved and C++14 is around the corner. These\u00a0new standards define a lot of interesting language features, one of them being support for the\u00a0override identifier. You can append \"override\" to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class. If the virtual method does not exist in the base class, or has a different signature, the compiler raises an error and the compilation fails.\n\nUse of override\u00a0is very useful for detecting errors, at compile time, caused by typos and bad\u00a0copy-pastes.\n\nVisual Studio has supported override since Visual Studio 2010, and so has Visual Assist. But if you want Visual Assist to insert \"override\" automatically\u2014when using the code generation feature Implement Virtual Methods\u2014you need to tell it via the Windows Registry."}},{"@type":"Question","name":"How to automatically add C++11 override to virtual methods?","acceptedAnswer":{"@type":"Answer","text":"The C++11 standard has been approved and C++14 is around the corner. These\u00a0new standards define a lot of interesting language features, one of them being support for the\u00a0override identifier. You can append \"override\" to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class. If the virtual method does not exist in the base class, or has a different signature, the compiler raises an error and the compilation fails.\n\nUse of override\u00a0is very useful for detecting errors, at compile time, caused by typos and bad\u00a0copy-pastes.\n\nVisual Studio has supported override since Visual Studio 2010, and so has Visual Assist. But if you want Visual Assist to insert \"override\" automatically\u2014when using the code generation feature Implement Virtual Methods\u2014you need to tell it via the Windows Registry."}}],"inLanguage":"en-US","breadcrumb":{"@id":"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/#breadcrumblist"}},{"@type":"Organization","@id":"https:\/\/www.wholetomato.com\/blog\/#organization","name":"Tomato Soup","description":"Visual Assist Team Blog","url":"https:\/\/www.wholetomato.com\/blog\/","email":"info@wholetomato.com","numberOfEmployees":{"@type":"QuantitativeValue","minValue":0,"maxValue":100},"logo":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/www.wholetomato.com\/blog\/wp-content\/uploads\/2020\/05\/wt-logo.jpg?fit=400%2C400&ssl=1","@id":"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/#organizationLogo","width":400,"height":400},"image":{"@id":"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/#organizationLogo"},"sameAs":["https:\/\/www.facebook.com\/wholetomatosoftware","https:\/\/twitter.com\/visualassist","https:\/\/www.youtube.com\/c\/Wholetomatosoftware","https:\/\/www.linkedin.com\/company\/whole-tomato-software"]},{"@type":"WebSite","@id":"https:\/\/www.wholetomato.com\/blog\/#website","url":"https:\/\/www.wholetomato.com\/blog\/","name":"Tomato Soup","description":"Visual Assist Team Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.wholetomato.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Tomato Soup - Visual Assist Team Blog","og:type":"article","og:title":"Automatically add C++11 override to virtual methods - Tomato Soup","og:description":"The C++11 standard has been approved and C++14 is around the corner. These new standards define a lot of interesting language features, one of them being support for the override identifier. You can append &quot;override&quot; to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class.","og:url":"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/","article:published_time":"2014-05-30T18:23:23+00:00","article:modified_time":"2022-06-22T23:03:26+00:00","article:publisher":"https:\/\/www.facebook.com\/wholetomatosoftware","twitter:card":"summary_large_image","twitter:site":"@visualassist","twitter:title":"Automatically add C++11 override to virtual methods - Tomato Soup","twitter:description":"The C++11 standard has been approved and C++14 is around the corner. These new standards define a lot of interesting language features, one of them being support for the override identifier. You can append &quot;override&quot; to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class.","twitter:creator":"@visualassist"},"aioseo_meta_data":{"post_id":"685","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":false},"graphs":[{"id":"#aioseo-faq-page-64c3be728b790","slug":"faq-page","graphName":"FAQPage","label":"FAQ Page","properties":{"type":"FAQPage","name":"#post_title","description":"#post_excerpt","questions":[{"question":"How to automatically add C++11 override to virtual methods?","answer":"The C++11 standard has been approved and C++14 is around the corner. These\u00a0new standards define a lot of interesting language features, one of them being support for the\u00a0override identifier. You can append \"override\" to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class. If the virtual method does not exist in the base class, or has a different signature, the compiler raises an error and the compilation fails.\n\nUse of override\u00a0is very useful for detecting errors, at compile time, caused by typos and bad\u00a0copy-pastes.\n\nVisual Studio has supported override since Visual Studio 2010, and so has Visual Assist. But if you want Visual Assist to insert \"override\" automatically\u2014when using the code generation feature Implement Virtual Methods\u2014you need to tell it via the Windows Registry."}]}}]},"schema_type":"WebPage","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[\"{\\\"question\\\":\\\"How to automatically add C++11 override to virtual methods?\\\",\\\"answer\\\":\\\"The C++11 standard has been approved and C++14 is around the corner. These\\\\u00a0new standards define a lot of interesting language features, one of them being support for the\\\\u00a0override identifier. You can append \\\\\\\"override\\\\\\\" to a virtual function declaration and tell the compiler that you want to override a virtual method inherited from a base class. If the virtual method does not exist in the base class, or has a different signature, the compiler raises an error and the compilation fails.\\\\n\\\\nUse of override\\\\u00a0is very useful for detecting errors, at compile time, caused by typos and bad\\\\u00a0copy-pastes.\\\\n\\\\nVisual Studio has supported override since Visual Studio 2010, and so has Visual Assist. But if you want Visual Assist to insert \\\\\\\"override\\\\\\\" automatically\\\\u2014when using the code generation feature Implement Virtual Methods\\\\u2014you need to tell it via the Windows Registry.\\\"}\"]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"FAQPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"open_ai":null,"ai":null,"created":"2022-02-02 22:41:44","updated":"2026-04-29 04:38:35"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/www.wholetomato.com\/blog\" title=\"Home\">Home<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/www.wholetomato.com\/blog\/category\/tips-and-tricks\/\" title=\"Tips and Tricks\">Tips and Tricks<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\tAutomatically add C++11 override to virtual methods\n<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.wholetomato.com\/blog"},{"label":"Tips and Tricks","link":"https:\/\/www.wholetomato.com\/blog\/category\/tips-and-tricks\/"},{"label":"Automatically add C++11 override to virtual methods","link":"https:\/\/www.wholetomato.com\/blog\/automatically-add-c11-override\/"}],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts\/685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wholetomato.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wholetomato.com\/blog\/wp-json\/wp\/v2\/users\/66190671"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wholetomato.com\/blog\/wp-json\/wp\/v2\/comments?post=685"}],"version-history":[{"count":4,"href":"https:\/\/www.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts\/685\/revisions"}],"predecessor-version":[{"id":3631,"href":"https:\/\/www.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts\/685\/revisions\/3631"}],"wp:attachment":[{"href":"https:\/\/www.wholetomato.com\/blog\/wp-json\/wp\/v2\/media?parent=685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wholetomato.com\/blog\/wp-json\/wp\/v2\/categories?post=685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wholetomato.com\/blog\/wp-json\/wp\/v2\/tags?post=685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}