Menü Kapat

C++ 17 Standardına Göre Derleme İşlemi (Compile With C++ 17 Linux)

Eigen yüklenmesi için  – Github Ayrıntı İçin

Bir kodu C++ kodunu C++ 17 standardına göre derlemek için aşağıda argümanı kullanmamız gerekir.

-std=c++1z

 

Örneğin eigen için kullandığımız kodu c++ 17 ile derlemek için aşağıdaki gibi bir söz dizimi kullanabiliriz.

g++ -std=c++1z -I/usr/include/eigen3 deneme.cpp -o sonuc

Aşağıdaki tabloda C++ 17 Dil özelliklerini destekleyen gcc sürümleri listelenmiştir.

Language Feature Proposal Available in GCC? SD-6 Feature Test
Removing trigraphs N4086 5.1  
u8 character literals N4267 6 __cpp_unicode_characters >= 201411
Folding expressions N4295 6 __cpp_fold_expressions >= 201411
Attributes for namespaces and enumerators N4266 4.9 (namespaces) 6 (enumerators) cpp_namespace_attributes >= 201411cpp_enumerator_attributes >= 201411
Nested namespace definitions N4230 6 __cpp_nested_namespace_definitions >= 201411
Allow constant evaluation for all non-type template arguments N4268 6 __cpp_nontype_template_args >= 201411
Extending static_assert N3928 6 __cpp_static_assert >= 201411
New Rules for auto deduction from braced-init-list N3922 5  
Allow typename in a template template parameter N4051 5  
attribute P0188R1 7 __has_cpp_attribute(fallthrough)
attribute P0189R1 4.8 () 7 (P0189R1) __has_cpp_attribute(nodiscard)
attribute P0212R1 4.8 () 7 (P0212R1) __has_cpp_attribute(maybe_unused)
Extension to aggregate initialization P0017R1 7 __cpp_aggregate_bases >= 201603
Wording for constexpr lambda P0170R1 7 __cpp_constexpr >= 201603
Unary Folds and Empty Parameter Packs P0036R0 6 __cpp_fold_expressions >= 201603
Generalizing the Range-Based For Loop P0184R0 6 __cpp_range_based_for >= 201603
Lambda capture of *this by Value P0018R3 7 __cpp_capture_star_this >= 201603
Construction Rules for enum classvariables P0138R2 7  
Hexadecimal floating literals for C++ P0245R1 3.0 __cpp_hex_float >= 201603
Dynamic memory allocation for over-aligned data P0035R4 7 __cpp_aligned_new >= 201606
Guaranteed copy elision P0135R1 7  
Refining Expression Evaluation Order for Idiomatic C++ P0145R3 7  
constexpr if P0292R2 7 __cpp_if_constexpr >= 201606
Selection statements with initializer P0305R1 7  
Template argument deduction for class templates P0091R3 7 __cpp_deduction_guides >= 201606
Declaring non-type template parameters with auto P0127R2 7 __cpp_template_auto >= 201606
Using attribute namespaces without repetition P0028R4 7  
Ignoring unsupported non-standard attributes P0283R2 Yes  
Structured bindings P0217R3 7 __cpp_structured_bindings >= 201606
Remove Deprecated Use of the register Keyword P0001R1 7  
Remove Deprecated operator++(bool) P0002R1 7  
Make exception specifications be part of the type system P0012R1 7 __cpp_noexcept_function_type >= 201510
__has_include for C++17 P0061R1 5  
Rewording inheriting constructors (core issue 1941 et al) P0136R1 7 __cpp_inheriting_constructors >= 201511
Inline variables P0386R2 7 __cpp_inline_variables >= 201606
DR 150, Matching of template template arguments P0522R0 7 __cpp_template_template_args >= 201611
Removing dynamic exception specifications P0003R5 7  
Pack expansions in using-declarations P0195R2 7 __cpp_variadic_using >= 201611
A byte type definition P0298R0 7

Bir yorum yazınız. Yorumlarınız bizim için değerlidir.