gcc4.9.1新特性-創(chuàng)新互聯(lián)

10年積累的做網(wǎng)站、成都網(wǎng)站制作經(jīng)驗(yàn),可以快速應(yīng)對(duì)客戶(hù)對(duì)網(wǎng)站的新想法和需求。提供各種問(wèn)題對(duì)應(yīng)的解決方案。讓選擇我們的客戶(hù)得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識(shí)你,你也不認(rèn)識(shí)我。但先網(wǎng)站設(shè)計(jì)后付款的網(wǎng)站建設(shè)流程,更有洛隆免費(fèi)網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。>C family Supportfor colorizing diagnostics emitted by GCC has been added. The -fdiagnostics-color=auto will enable it when outputting to terminals, -fdiagnostics-color=always unconditionally. The GCC_COLORS environment variable can be used to customize the colors or disable coloring. If GCC_COLORS variable is present in the environment, the default is -fdiagnostics-color=auto, otherwise -fdiagnostics-color=never. Sample diagnostics output: $ g++ -fdiagnostics-color=always -S -Wall test.C test.C: In function ‘int foo()’: test.C:1:14: warning: no return statement in function returning non-void [-Wreturn-type] int foo () { } ^ test.C:2:46: error: template instantiation depth exceeds maximum of 900 (use -ftemplate-depth= to increase the maximum) instantiating ‘struct X<100>’ template<int N> struct X { static const int value = X<N-1>::value; }; template struct X<1000>; ^ test.C:2:46: recursively required from ‘const int X<999>::value’ test.C:2:46: required from ‘const int X<1000>::value’ test.C:2:88: required from here test.C:2:46: error: incomplete type ‘X<100>’ used in nested name specifier With thenew #pragma GCC ivdep, the user can assert that there are no loop-carried dependencies which would prevent concurrent execution of consecutive iterations using SIMD (single instruction multiple data) instructions. Supportfor Cilk Plus has been added and can be enabled with the -fcilkplus option. Cilk Plus is an extension to the C and C++ languages to support data and task parallelism. The present implementation follows ABI version 1.2; all features but _Cilk_for have been implemented. C ISO C11 atomics (the _Atomic type specifier and qualifier and the<stdatomic.h> header) are now supported. ISO C11 generic selections (_Generic keyword) are now supported. ISO C11 thread-local storage (_Thread_local, similar to GNU C __thread) is now supported. ISO C11 supportis now at a similar level of completeness to ISO C99 support: substantially complete modulo bugs, extended identifiers (supported except for corner cases when -fextended-identifiers is used), floating-point issues (mainly but not entirely relating to optional C99 features from Annexes F and G) and the optional Annexes K (Bounds-checking interfaces) and L (Analyzability). Anew C extension __auto_type provides a subset of the functionality of C++11 auto in GNU C. C++ The G++ implementation of C++1y return type deduction for normal functions has been updated to conform to N3638, the proposal accepted into the working paper. Most notably, it adds decltype(auto) for getting decltype semantics rather than the template argument deduction semantics of plain auto: int& f(); auto i1= f(); // intdecltype(auto) i2 = f(); // int&G++ supports C++1y lambda capture initializers: [x= 42]{ ... }; Actually, they have been accepted since GCC4.5, but now the compiler doesn't warn about them with -std=c++1y, and supports parenthesized and brace-enclosed initializers as well.G++ supports C++1y variable length arrays. G++ has supported GNU/C99-style VLAs for a long time, but now additionally supports initializers and lambda capture by reference. In C++1y mode G++ will complain about VLA uses that are not permitted by the draft standard, such as forming a pointer to VLA type or applying sizeof to a VLA variable. Note that it now appears that VLAs will not be part of C++14, but will be part of a separate document and then perhaps C++17. void f(int n) { int a[n] = { 1, 2, 3 }; // throws std::bad_array_length if n < 3 [&a]{ for (int i : a) { cout << i << endl; } }(); &a; // error, taking address of VLA} G++ supports the C++1y [[deprecated]] attribute modulo bugs in the underlying [[gnu::deprecated]] attribute. Classes and functions can be marked deprecated and a diagnostic message added: class A; int bar(int n); #if __cplusplus > 201103 class [[deprecated("A is deprecated in C++14; Use B instead")]] A; [[deprecated("bar is unsafe; use foo() instead")]] int bar(int n); int foo(int n); class B; #endif A aa;// warning: 'A' is deprecated : A is deprecated in C++14; Use B insteadint j = bar(2); // warning: 'int bar(int)' is deprecated : bar is unsafe; use foo() insteadG++ supports C++1y digit separators. Long numeric literals can be subdivided with a single quote ' to enhance readability:int i = 1048576; int j = 1'048'576; int k = 0x10'0000;int m = 0'004'000'000;int n = 0b0001'0000'0000'0000'0000'0000;double x = 1.602'176'565e-19; double y = 1.602'176'565e-1'9;G++ supports C++1y generic (polymorphic) lambdas. // a functional object that will increment any typeauto incr = [](auto x) { return x++; }; As a GNU extension, G++ supports explicit template parameter syntax for generic lambdas. This can be combined in the expected way with the standard auto syntax. // a functional object that will add two like-type objectsauto add = [] <typename T> (T a, T b) { return a + b; }; G++ supports unconstrained generic functions as specified by §4.1.2 and §5.1.1 of N3889: Concepts Lite Specification. Briefly, auto may be used as a type-specifier in a parameter declaration of any function declarator in order to introduce an implicit function template parameter, akin to generic lambdas. // the following two function declarations are equivalentauto incr(auto x) { return x++; } template<typename T> auto incr(T x) {return x++; } Runtime Library (libstdc++) Improved supportfor C++11, including: supportfor <regex>; The associative containersin <map> and <set> and the unordered associative containers in <unordered_map> and <unordered_set> meet the allocator-aware container requirements; Improved experimental supportfor the upcoming ISO C++ standard, C++14, including: fixing constexpr member functions withoutconst; implementation of the std::exchange() utility function; addressing tuples by type; implemention of std::make_unique; implemention of std::shared_lock; making std::result_of SFINAE-friendly; addingoperator() to integral_constant; adding user-defined literals for standard library types std::basic_string, std::chrono::duration, and std::complex; adding two range overloads to non-modifying sequence oprations std::equal and std::mismatch; adding IO manipulatorsfor quoted strings; adding constexpr members to<utility>, <complex>, <chrono>, and some containers; adding compile-time std::integer_sequence; adding cleaner transformation traits; making<functional>s operator functors easier to use and more generic; An implementation of std::experimental::optional. An implementation of std::experimental::string_view. The non-standard function std::copy_exception has been deprecated and will be removed in a future version. std::make_exception_ptr should be used instead.

當(dāng)前題目:gcc4.9.1新特性-創(chuàng)新互聯(lián)
文章分享:http://bm7419.com/article8/dgojop.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供動(dòng)態(tài)網(wǎng)站、全網(wǎng)營(yíng)銷(xiāo)推廣網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì)公司網(wǎng)站導(dǎo)航、品牌網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

手機(jī)網(wǎng)站建設(shè)