зеркало из https://github.com/microsoft/gnls.git
Enable C++20 support
This commit is contained in:
Родитель
709e846009
Коммит
98717de1a8
|
@ -1,5 +1,6 @@
|
|||
#include <map>
|
||||
#include <memory>
|
||||
#include <ranges>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
@ -252,9 +253,9 @@ class GNDocument {
|
|||
continue;
|
||||
}
|
||||
if (const auto* block = node->AsBlock()) {
|
||||
for (auto item = block->statements().rbegin();
|
||||
item != block->statements().rend(); item++) {
|
||||
nodes.push(item->get());
|
||||
for (const auto& item :
|
||||
std::ranges::reverse_view(block->statements())) {
|
||||
nodes.push(item.get());
|
||||
}
|
||||
} else if (const auto* condition = node->AsCondition()) {
|
||||
nodes.push(condition->if_false());
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
'<(rootdir)/gn/out/<(target_arch)/gn_lib<(STATIC_LIB_SUFFIX)',
|
||||
],
|
||||
'cflags_cc': [
|
||||
'-std=c++17',
|
||||
'-std=c++20',
|
||||
'-Wall',
|
||||
'-Wextra',
|
||||
'-Werror',
|
||||
|
@ -37,7 +37,7 @@
|
|||
}],
|
||||
['OS=="mac"', {
|
||||
'xcode_settings': {
|
||||
'CLANG_CXX_LANGUAGE_STANDARD': 'c++17',
|
||||
'CLANG_CXX_LANGUAGE_STANDARD': 'c++20',
|
||||
'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES',
|
||||
'OTHER_CPLUSPLUSFLAGS': [
|
||||
'$(inherited)',
|
||||
|
@ -57,7 +57,7 @@
|
|||
'4127',
|
||||
],
|
||||
'AdditionalOptions': [
|
||||
'-std:c++17',
|
||||
'-std:c++20',
|
||||
],
|
||||
},
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче