{"id":2999,"date":"2018-07-05T20:00:39","date_gmt":"2018-07-05T18:00:39","guid":{"rendered":"https:\/\/mariusbancila.ro\/blog\/?p=2999"},"modified":"2018-07-08T23:34:32","modified_gmt":"2018-07-08T21:34:32","slug":"c17-removed-and-deprecated-features","status":"publish","type":"post","link":"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/","title":{"rendered":"C++17 removed and deprecated features"},"content":{"rendered":"<p>Along with the new features added to the language and the standard library in C++17, there are also existing features that have been either removed (after being deprecated in a previous version) or deprecated so they would be removed sometime in the future. Although not complete, the following tables list the most important of these removed or deprecated features. <\/p>\n<p>The following table lists features that were removed in C++17.<\/p>\n<table>\n<tr>\n<th>Feature<\/th>\n<th>Comments<\/th>\n<th>Alternatives<\/th>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/language\/except_spec\">throw(typeid)<\/a><\/td>\n<td>Explicit dynamic specification allowed specifying one or more types for exception that might be thrown by a function.<\/td>\n<td>This feature does not have an alternative. Instead, functions should only specify whether they could throw exceptions or not (without specifying their type). <tt>noexcept<\/tt> is the specifier use for this purpose. However, make sure you use it only when it&#8217;s guarantee that the invocation of the function cannot throw any error; otherwise, the program will terminate abnormally with a call to <tt>std::terminate()<\/tt>.<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/language\/operator_incdec\">operator++ for bool<\/a><\/td>\n<td>The pre-fix and post-fix operator++ was overloaded for type <tt>bool<\/tt>. In both cases, the return value for a <tt>bool<\/tt> argument is <tt>true<\/tt>. Since the <tt>bool<\/tt> type does not support the full set of arithmetic types, it is no longer considered an arithmetic type and these operators have been removed.<\/td>\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/exchange\">std::exchange<\/a> for the rare cases where the post-fix operator has valid uses. See <a href=\"http:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2013\/n3668\">exchange() utility function, revision 3<\/a> for examples of these cases.<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/language\/operator_alternative\">Trigraphs<\/a><\/td>\n<td>Trigraphs (short for three-character groups) are alternatives for some characters, introduced with two question marks (which is also the reason the question mark has to be escaped <tt>'\\?'<\/tt>). They were introduced for compatibility with C which had them <a href=\"https:\/\/stackoverflow.com\/questions\/1234582\/purpose-of-trigraph-sequences-in-c\">for keyboards that did not support the ISO 646 character set<\/a>. Trigraphs are parsed before comments and string literals are recognized and can be a source of confusion for many programmers. For reason of deprecation see <a href=\"http:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2009\/n2910.pdf\">Comment on proposed trigraph deprecation<\/a>.<\/td>\n<td>None<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/language\/storage_duration\">register storage specifier<\/a><\/td>\n<td>Was a specifier for objects declared at block scope or in function parameter lists to indicate automatic storage duration as well as a hint to the compiler that these variables might be heavily used so that it can do optimization by storing it in a CPU register. Since the automatic storage duration for these kinds of variables is implicit and the hint was rarely used by the compilers this feature was deprecated in C++11 and removed in C++17.<\/td>\n<td>None<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/memory\/auto_ptr\">std::auto_ptr<\/a><\/td>\n<td><tt>auto_ptr<\/tt> was the attempt to create a smart pointer to handle an object&#8217;s lifetime before move semantics were available. This smart pointer quietly steals ownership of the managed object in its copy constructor and copy assignment from the right-hand argument. As a result, the copy is not the same as the original smart pointer object. Because of these copy semantics, <tt>auto_ptr<\/tt> does not meet the requirements of being <em>CopyConstructible<\/em>, and therefore cannot be used in standard containers. For more information about the deprecation of <tt>auto_ptr<\/tt> see <a href=\"http:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2005\/n1856.html#20.4.5%20-%20Class%20template%20auto_ptr\">N1856<\/a>.<\/td>\n<td>For most uses, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/memory\/unique_ptr\">std::unique_ptr<\/a> is the direct replacement of <tt>std::auto_ptr<\/tt>. In many cases, it can be a simple drop in replacement, although an explicit move might be necessary to be done. For more information on the topic see this <a href=\"https:\/\/stackoverflow.com\/a\/3451179\/648078\">discussion<\/a>.<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/algorithm\/random_shuffle\">std::random_shuffle<\/a><\/td>\n<td>This algorithm reorders elements of a range so that each possible permutation of its elements has an equal probability of appearance. The problem with it is that it may depend on the <tt>rand<\/tt> family of C functions, that may be deprecated in the future. On the other hand, it may also have global state for seeding and others. For more information see <a h ref=\"https:\/\/meetingcpp.com\/blog\/items\/stdrandom_shuffle-is-deprecated.html\">std::random_shuffle is deprecated in C++14<\/a>.<\/td>\n<td>The replacement is <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/algorithm\/random_shuffle\">std::shuffle<\/a>, that needs as the third argument a <a href=\"http:\/\/en.cppreference.com\/w\/cpp\/concept\/UniformRandomNumberGenerator\">uniform random bit generator<\/a>. Although the replacement of the algorithm itself is trivial, you need to setup a URNG, several standard ones being available in the <tt>&lt;random&gt;<\/tt> header.<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/unary_function\">std::unary_function<\/a>, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/binary_function\">std::binary_function<\/a>\n  <\/td>\n<td>These are former types used solely for defining some types (argument and result types). They used to be the base class for function objects that required these type definitions because they were necessary in some parts of the standard library. Such an function object was <tt>std::less<\/tt>. These restrictions have been lifted in C++11 because they were actually an overspecification.<\/td>\n<td>If needed, define the argument and result types in your class.<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/pointer_to_unary_function\">std::pointer_to_unary_function<\/a>, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/pointer_to_binary_function\">std::pointer_to_binary_function<\/a>\n<\/td>\n<td>Function objects that act as wrappers around unary or binary functions. <\/td>\n<td rowspan=\"2\"><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/function\">std::function<\/a> and <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/ref\">std::ref<\/a>\n<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/ptr_fun\">std::ptr_fun<\/a>\n<\/td>\n<td>Creates instances of <tt>std::pointer_to_unary_function<\/tt> and <tt>std::pointer_to_binary_function<\/tt>.<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td>\n<a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/mem_fun_t\">std::mem_fun_t<\/a>,<br \/>\n<a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/mem_fun_t\">std::mem_fun1_t<\/a>,<br \/>\n<a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/mem_fun_t\">std::const_mem_fun_t<\/a>,<br \/>\n<a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/mem_fun_t\">std::const_mem_fun1_t<\/a>,<br \/>\n<a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/mem_fun_ref_t\">std::mem_fun_ref_t<\/a>,<br \/>\n<a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/mem_fun_ref_t\">std::mem_fun1_ref_t<\/a>,<br \/>\n<a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/mem_fun_ref_t\">std::const_mem_fun_ref_t<\/a>,<br \/>\n<a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/mem_fun_ref_t\">std::const_mem_fun1_ref_t<\/a><\/td>\n<td>These are function objects that wrap a pointer to a member function with no parameters or one parameter. For the former, the object whose member function to call is passed by pointer to the call operator; for the latter, it is passed as a reference. They are deprecated because they are limited to member functions with either none or just one argument and you need different functions and function objects for handling pointers or references to the class instance.<\/td>\n<td rowspan=\"2\"><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/mem_fn\">std::mem_fn<\/a> is a variadic template that can handle member functions with any number of variables and not only references or pointers to objects but also smart pointers.<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/mem_fun\">std::mem_fun<\/a>, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/mem_fun_ref\">std::mem_fun_ref<\/a>\n<\/td>\n<td>These are helper functions that create the member function wrapper objects above.<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/binder12\">std::binder1st<\/a>, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/binder12\">std::binder2nd<\/a><\/td>\n<td>These are function objects that bind an argument to a binary function.<\/td>\n<td rowspan=\"2\">Lambdas, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/bind\">std::bind<\/a><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/bind12\">std::bind1st<\/a>, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/bind12\">std::bind2nd<\/a><\/td>\n<td>Helper functions that create instances of <tt>std::binder1st<\/tt> or <tt>std::binder2nd<\/tt>, binding a given argument to a first or second parameter of a given binary function object.<br \/>\nThese were remnants of utility functions in STL that did make it into C++98 but became obsolete with the introduction of lambdas in C++11, when they were deprecated.\n  <\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/function\/function\">std::function<\/a> allocator support<\/td>\n<td>Several constructors allow to specify an allocator used for allocating internal memory if needed. However, this was later considered poorly specified and inconsistently implemented (with some implementation not providing these overloads at all). Therefore, these constructor overloads were removed in C++17.<\/td>\n<td rowspan=\"2\">None<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/function\/uses_allocator\">std::uses_allocator&lt;std::function&gt;<\/a><\/td>\n<td>A specialization of <tt>std::uses_allocator<\/tt> used for indicating that all objects of type <tt>std::function<\/tt> support uses-allocator construction. This was removed together with the allocator support for <tt>std::function<\/tt>.<\/td>\n<\/tr>\n<\/table>\n<p>The following table lists features that were deprecated in C++17 and removed in C++20.<\/p>\n<table>\n<tr>\n<th>Feature<\/th>\n<th>Comments<\/th>\n<th>Alternatives<\/th>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/error\/uncaught_exception\">std::uncaught_exception<\/a><\/td>\n<td>This function indicates whether the stack unwiding is already in progress. It assumes there&#8217;s only one active exception in a thread, although multiple can exist simultaneously. This function was sometimes wrongly used in destructors to detect if the destructor was called due to stack unwiding. But as explained in <a href=\"http:\/\/www.gotw.ca\/gotw\/047.htm\">GotW #47: Uncaught Exceptions<\/a>, that is a bad pattern, because once unwinding of any exception, everything looks like unwiding regardless how many active exception exist. As a result, this function had no useful purpose and will be removed. For more information see <a href=\"http:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2014\/n4152.pdf\">N4152<\/a>.<\/td>\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/error\/uncaught_exception\">std::uncaught_exceptions<\/a> indicates the number of exceptions in the current thread that have been thrown\/rethrown and not yet entered their matching catch clauses.<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/language\/noexcept_spec\">throw()<\/a><\/td>\n<td>This is the non-throwing version of the dynamic exception specification hat has been deprecated and now removed. This specifier has been replaced with <tt>noexcept<\/tt> a term that is more clear on its intent.<\/td>\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/language\/noexcept_spec\">noexcept<\/a><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/unary_negate\">std::unary_negate<\/a>, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/binary_negate\">std::binary_negate<\/a>\n<\/td>\n<td>These are wrapper function objects that return the complement of the unary or binary predicate they hold.<\/td>\n<td rowspan=\"2\">Lambdas, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/not_fn\">std::not_fn<\/a><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/not1\">std::not1<\/a>, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/functional\/not2\">std::not2<\/a>\n<\/td>\n<td>These are helper functions used to construct <tt>std::unary_negate<\/tt> and <tt>std::binary_negate<\/tt> function objects.<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/memory\/get_temporary_buffer\">std::get_temporary_buffer<\/a>, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/memory\/return_temporary_buffer\">std::return_temporary_buffer<\/a>, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/memory\/raw_storage_iterator\">std::raw_storage_iterator<\/a><\/td>\n<td>These are remnants of the original STL implementation that where added into the standard together with other utilities but have little to no real usefulness nowadays (although they&#8217;re used internally by some standard algorithms like <tt>stable_partition()<\/tt>) and therefore have been deprecated and will be removed. See <a href=\"https:\/\/stackoverflow.com\/questions\/3264299\/why-do-i-need-stdget-temporary-buffer\">Why do I need std::get_temporary_buffer?<\/a> for more information on the utility of these functions.\n<\/td>\n<td>None<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/types\/is_literal_type\">std::is_literal_type<\/a>, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/types\/is_literal_type\">std::is_literal_type_v<\/a><\/td>\n<td>The intention of this type trait was to ensure that a specific construction would produce constant initialization. However, the requirement that a type should have at least one constexpr constructor (that is not a copy or move constructor) it too week to ensure such guarantee. See <a href=\"http:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2016\/p0174r2.html#2.3\">Deprecate the is_literal Trait<\/a> for the rational of deprecating this feature.<\/td>\n<td>None<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/types\/result_of\">std::result_of<\/a>, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/types\/result_of\">std::result_of_t<\/a><\/td>\n<td>This is a type trait used to deduce the return type of an invoke expression at compile time. In C++11, its behaviour is undefine when the invoke expression is ill-formed (if <tt>F<\/tt> is not a callable type, reference to function, or reference to callable type). In C++14, this was changed to SFINAE. Because of its limitations (for instance <tt>F<\/tt> cannot be a function type, but can be a reference to it, and <tt>F<\/tt> and any of its arguments cannot be an abstract class type, etc.) it has been replaced with <tt>std::invoke_result<\/tt>.<\/td>\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/types\/result_of\">std::invoke_result<\/a><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/memory\/shared_ptr\/unique\">std::shared_ptr::unique<\/a><\/td>\n<td>Indicates whether the current object is the only <tt>shared_ptr<\/tt> instance that manages the object. This function does not work properly in a multithreading environement, the use count of the object being only an approximation. This was initially intended as a debug only feature but to work properly it needs synchronization, which is not used in practice. See <a href=\"https:\/\/stackoverflow.com\/questions\/41142315\/why-is-stdshared-ptrunique-deprecated\">Why is std::shared_ptr::unique() deprecated?<\/a> for more information.<\/td>\n<td>None<\/td>\n<\/tr>\n<\/table>\n<p>The following table lists features that were deprecated in C++17.<\/p>\n<table>\n<tr>\n<th>Feature<\/th>\n<th>Comments<\/th>\n<th>Alternatives<\/th>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/header\/codecvt\">&lt;codecvt&gt;<\/a> header<\/td>\n<td>Is a part of the localization library, providing facets for converting between byte and wide character sets (such as UTF-8 and UTF-16). It was deprecated because it is not considered &#8220;the best way to address transcoding&#8221;, for several reasons, such as lacking of default error handling mechanisms for attacks through ill-formed UTF, obscure specifications, lack of portability, etc. For more information, see <a href=\"http:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2017\/p0618r0.html\">Deprecating &lt;codecvt&gt;<\/tt>.<\/td>\n<td>None<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/locale\/wbuffer_convert\">std::wbuffer_convert, <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/locale\/wstring_convert\">std::wstring_convert<\/a><\/td>\n<td>These are utility types that perform conversion between a byte stream buffer and a wide stream buffer and, respectively, between a byte string and a wide string using conversion facets from <tt>&lt;codecvt&gt;<\/tt> (the ones available are <tt>std::codecvt_utf8<\/tt> for UTF-8\/UCS2 and UTF-8\/UCS4 conversions and <tt>std::codecvt_utf8_utf16 for UTF-8\/UTF-16<\/tt> conversions). Since these go together with the deprecated standard facets from <tt>&lt;codecvt&gt;<\/tt>, they have been also deprecated.<\/td>\n<td>None<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/iterator\/iterator\">std::iterator<\/a><\/td>\n<td>Is a base class that was provided in the first version of the standard to simplify the definition of iterator types by providing five type definitions (<tt>iterator_category<\/tt>, <tt>value_type<\/tt>, <tt>difference_type<\/tt>, <tt>pointer<\/tt>, <tt>reference<\/tt>). It is often used with a sequence of <tt>void<\/tt> arguments (such as in <tt>iterator&lt;output_iterator_tag, void, void, void, void&gt;<\/tt>). Following the pattern with deprecating <tt>unary_function<\/tt> and <tt>binary_function<\/tt> and explicitly definiting the types in the class rather than having a base class for that, the <tt>iterator<\/tt> class has also been deprecated.<\/td>\n<td>Specify the necessary type definitions in your class.<\/td>\n<\/tr>\n<\/table>\n<p>For more changes between C++14 and C++17 see this <a href=\"https:\/\/isocpp.org\/files\/papers\/p0636r0.html\">document<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Along with the new features added to the language and the standard library in C++17, there are also existing features that have been either removed (after being deprecated in a previous version) or deprecated so they would be removed sometime in the future. Although not complete, the following tables list the most important of these removed or deprecated features. <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","advgb_blocks_editor_width":"","advgb_blocks_columns_visual_guide":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[7],"tags":[451,475,138,74],"class_list":["post-2999","post","type-post","status-publish","format-standard","hentry","category-c","tag-c","tag-c17","tag-library","tag-standard"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Marius Bancila\"\/>\n\t<meta name=\"keywords\" content=\"c++,c++17,library,standard\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Marius Bancila&#039;s Blog | About code. Mostly on C++\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"C++17 removed and deprecated features\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2018-07-05T18:00:39+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2018-07-08T21:34:32+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"C++17 removed and deprecated features\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2018\\\/07\\\/05\\\/c17-removed-and-deprecated-features\\\/#article\",\"name\":\"C++17 removed and deprecated features\",\"headline\":\"C++17 removed and deprecated features\",\"author\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\"},\"datePublished\":\"2018-07-05T20:00:39+02:00\",\"dateModified\":\"2018-07-08T23:34:32+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2018\\\/07\\\/05\\\/c17-removed-and-deprecated-features\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2018\\\/07\\\/05\\\/c17-removed-and-deprecated-features\\\/#webpage\"},\"articleSection\":\"C++, C++, C++17, library, standard\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2018\\\/07\\\/05\\\/c17-removed-and-deprecated-features\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"name\":\"IT\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"position\":2,\"name\":\"IT\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"name\":\"Software\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"position\":3,\"name\":\"Software\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/c\\\/#listItem\",\"name\":\"C++\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"name\":\"IT\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/c\\\/#listItem\",\"position\":4,\"name\":\"C++\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/c\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2018\\\/07\\\/05\\\/c17-removed-and-deprecated-features\\\/#listItem\",\"name\":\"C++17 removed and deprecated features\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"name\":\"Software\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2018\\\/07\\\/05\\\/c17-removed-and-deprecated-features\\\/#listItem\",\"position\":5,\"name\":\"C++17 removed and deprecated features\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/c\\\/#listItem\",\"name\":\"C++\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\",\"name\":\"Marius Bancila's Blog\",\"description\":\"About code. Mostly on C++\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"Marius Bancila\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2018\\\/07\\\/05\\\/c17-removed-and-deprecated-features\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a84dd2831d955c38355ddea55df4df260809b88f36408bc14fd4eab8f7f131c9?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Marius Bancila\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2018\\\/07\\\/05\\\/c17-removed-and-deprecated-features\\\/#webpage\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2018\\\/07\\\/05\\\/c17-removed-and-deprecated-features\\\/\",\"name\":\"C++17 removed and deprecated features\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2018\\\/07\\\/05\\\/c17-removed-and-deprecated-features\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2018-07-05T20:00:39+02:00\",\"dateModified\":\"2018-07-08T23:34:32+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/\",\"name\":\"Marius Bancila's Blog\",\"description\":\"About code. Mostly on C++\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"C++17 removed and deprecated features","description":"","canonical_url":"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/","robots":"max-image-preview:large","keywords":"c++,c++17,library,standard","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/#article","name":"C++17 removed and deprecated features","headline":"C++17 removed and deprecated features","author":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/mariusbancila.ro\/blog\/#organization"},"datePublished":"2018-07-05T20:00:39+02:00","dateModified":"2018-07-08T23:34:32+02:00","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/#webpage"},"isPartOf":{"@id":"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/#webpage"},"articleSection":"C++, C++, C++17, library, standard"},{"@type":"BreadcrumbList","@id":"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/mariusbancila.ro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","name":"IT"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","position":2,"name":"IT","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","name":"Software"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","position":3,"name":"Software","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/#listItem","name":"C++"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","name":"IT"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/#listItem","position":4,"name":"C++","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/#listItem","name":"C++17 removed and deprecated features"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","name":"Software"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/#listItem","position":5,"name":"C++17 removed and deprecated features","previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/#listItem","name":"C++"}}]},{"@type":"Organization","@id":"https:\/\/mariusbancila.ro\/blog\/#organization","name":"Marius Bancila's Blog","description":"About code. Mostly on C++","url":"https:\/\/mariusbancila.ro\/blog\/"},{"@type":"Person","@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author","url":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/","name":"Marius Bancila","image":{"@type":"ImageObject","@id":"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a84dd2831d955c38355ddea55df4df260809b88f36408bc14fd4eab8f7f131c9?s=96&d=mm&r=g","width":96,"height":96,"caption":"Marius Bancila"}},{"@type":"WebPage","@id":"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/#webpage","url":"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/","name":"C++17 removed and deprecated features","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/mariusbancila.ro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/#breadcrumblist"},"author":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"datePublished":"2018-07-05T20:00:39+02:00","dateModified":"2018-07-08T23:34:32+02:00"},{"@type":"WebSite","@id":"https:\/\/mariusbancila.ro\/blog\/#website","url":"https:\/\/mariusbancila.ro\/blog\/","name":"Marius Bancila's Blog","description":"About code. Mostly on C++","inLanguage":"en-US","publisher":{"@id":"https:\/\/mariusbancila.ro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Marius Bancila's Blog | About code. Mostly on C++","og:type":"article","og:title":"C++17 removed and deprecated features","og:url":"https:\/\/mariusbancila.ro\/blog\/2018\/07\/05\/c17-removed-and-deprecated-features\/","article:published_time":"2018-07-05T18:00:39+00:00","article:modified_time":"2018-07-08T21:34:32+00:00","twitter:card":"summary","twitter:title":"C++17 removed and deprecated features"},"aioseo_meta_data":{"post_id":"2999","title":null,"description":null,"keywords":null,"keyphrases":null,"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":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"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":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"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":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-03-18 21:04:29","updated":"2025-12-12 07:49:13","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"author_meta":{"display_name":"Marius Bancila","author_link":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/"},"featured_img":null,"jetpack_publicize_connections":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Marius Bancila","author_link":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/"},"uagb_comment_info":1,"uagb_excerpt":"Along with the new features added to the language and the standard library in C++17, there are also existing features that have been either removed (after being deprecated in a previous version) or deprecated so they would be removed sometime in the future. Although not complete, the following tables list the most important of these&hellip;","coauthors":[],"tax_additional":{"categories":{"linked":["<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/\" class=\"advgb-post-tax-term\">C++<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">C++<\/span>"]},"tags":{"linked":["<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/\" class=\"advgb-post-tax-term\">C++<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/\" class=\"advgb-post-tax-term\">C++17<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/\" class=\"advgb-post-tax-term\">library<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/\" class=\"advgb-post-tax-term\">standard<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">C++<\/span>","<span class=\"advgb-post-tax-term\">C++17<\/span>","<span class=\"advgb-post-tax-term\">library<\/span>","<span class=\"advgb-post-tax-term\">standard<\/span>"]}},"comment_count":"1","relative_dates":{"created":"Posted 8 years ago","modified":"Updated 8 years ago"},"absolute_dates":{"created":"Posted on July 5, 2018","modified":"Updated on July 8, 2018"},"absolute_dates_time":{"created":"Posted on July 5, 2018 8:00 pm","modified":"Updated on July 8, 2018 11:34 pm"},"featured_img_caption":"","series_order":"","jetpack_shortlink":"https:\/\/wp.me\/pYNdv-Mn","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/2999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/comments?post=2999"}],"version-history":[{"count":35,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/2999\/revisions"}],"predecessor-version":[{"id":3044,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/2999\/revisions\/3044"}],"wp:attachment":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/media?parent=2999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/categories?post=2999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/tags?post=2999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}