Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the C compilers that support the Category 11 feature?

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Today, I would like to talk to you about the C compilers that support the features of Clover 11, which may not be well understood by many people. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

The next version of GCC is 4.8, and the upcoming version of Clang is 3.3. If you are using Visual Studio 2012, you can install the experiential version of CTP, which supports extra features in November 2012.

I'm also curious about V.13.0's Intel C++ compiler, although it's not a preview yet and I can't find information about its new features. I didn't find any information about this upcoming version of the compiler.

FeatureVS2012

Nov CTPg++ 4.8Clang 3.3Intel 13.0autoYesYesYesYesdecltypeYesYesYesYesRvalue references and move semanticsYesYesYesYesLambda expressionsYesYesYesYesnullptrYesYesYesYesstatic_assertYesYesYesYesRange based for loopYesYesYesYesTrailing return type in functionsYesYesYesYesextern templatesYesYesYesYes > > for nested templatesYesYesYesYesLocal and unnamed types as template argumentsYesYesYesYesVariadic macrosYesYesYesYesVariadic templatesYesYesYesYesDefault template arguments in function templatesYesYesYesYesfinal method keywordYesYesYesNooverride method keywordYesYesYesNoStrongly typed enumsYesYesYesPartialForward declared enumsYesYesYesPartialInitializer listsYesYesYesPartialexplicit type conversion operatorsYesYesYesNoRaw string literalsYesYesYesNoForwarding constructorsYesYesYesNoTemplate aliasesNoYesYesYesDefaulted methodsNoYesYesYesDeleted methodsNoYesYesYesNew built-in typesPartialYesYesPartialAlignment supportPartialYesYesNoInline namespacesNoYesYesNosizeof on non-static data members without an instanceNoYesYesNoChanged restrictions on union membersNoYesYesNoUser defined literalsNoYesYesNoEncoding support in literalsNoYesYesNoArbitrary expressions in template deduction contextsNoYesYesDon't knowNon-static data member initializersNoYesYesDon't knownoexceptNoYesYesPartialconstexprNoYesYesPartialC99 compatibilityPartialYesPartialYesGeneralized attributesNoYesPartialYesThread local storagePartialYesNoPartialInheriting constructorsNoYesNoNoRvalue references for * thisNoNoYesNoMinimal support for garbage collectionYesNoNoDon't know

It seems that GCC is replacing Clang as the compiler that most supports Category 11. Visual Studio has added several important Category 11 features, such as variable parameter templates, initializers, and native words.

I really can't comment on how well these compiler implementations have been implemented and whether there is bug at a more detailed level. (in addition to VS2012--, I listed a large number of bug in the original version of VS2012 in detail in my book ("Clearing 11 Rocks").

It is also useful to take a look at the support of the library. Since there are many minor changes to the support of the standard library by each compiler, I do not intend to give details on this. I also intend to omit the Intel library in this comparison.

I can say that the main attachments of these libraries are mostly provided by third-party implementations (shown later in the table below), although there are various warnings.

Microsoft's library implementation does not require language features that have not yet been implemented, such as constexpr (such as the initial release of VS2012). The library file has not been updated to support the compiler features proposed in CTP in November 2012, such as initialization lists and variable parameter templates.

GCC's libstdc++ is also lagging behind, for example, it does not support regular expressions and local concurrency features. Again, in many cases, it does not implement the constexpr method.

Clang's libc++ is 100% compatible with MacOS, but some of its features are not compatible with Windows and Linux.

FeatureMSVClibstdc++libc++Concurrency: async/future/promise/packaged_taskYesYesYesConcurrency: thread and relatedYesYesYesConcurrency: condition variablesYesYesYesConcurrency: mutexesYesYesYesConcurrency: atomic types and operationsYesYesYesConcurrency: relaxed memory ordering and fencesYesNoYesSmart pointersYesYesYesTuplesYesYesYesstd::bindYesYesYesstd::functionYesYesYesRegular expressionsYesNoYesType traitsYesPartialYesstd::forward_listYesYesYesstd::arrayYesYesYesHash tablesYesYesYesRandom number generationYesYesYesCompile time rational numbers (ratio) YesYesYesTime utilities (chrono) YesYesYesInitializer listsYesYesYesDiagnostics (system_error) YesYesYesSTL refinements and new algorithmsYesYesYesGeneral purpose (move, forward, declval etc.) YesYesYes

It's nice to see that support for languages and libraries is steadily improving. Clang and GCC are very close to full support for Central11. Visual Studio is also improving support for Clover 11, and I'm glad that the C++ compiler updates are all on the main branch. There is also a growing list of compiler features for Intel.

After reading the above, do you have any further understanding of the C compilers that support the Category 11 feature? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report