Skip to content

Commit 18762cc

Browse files
committed
升级gcc版本
1 parent 2dbbf8f commit 18762cc

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ jobs:
2222
- uses: actions/checkout@v2
2323
with:
2424
ref: refs/heads/master
25+
- name: install gcc 11
26+
if: startsWith(matrix.os, 'ubuntu')
27+
run: |
28+
sudo apt-get install -y gcc-11 g++-11
29+
2530
- name: Build
2631
run: |
2732
mkdir build
@@ -30,7 +35,9 @@ jobs:
3035
cmake --build . --config Release
3136
ctest -V -C Release
3237
cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/
33-
38+
env:
39+
CC: gcc-11
40+
CXX: g++-11
3441
- name: Upload
3542
uses: actions/upload-artifact@v2
3643
with:

include/CodeFormatServer/LanguageClient.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@
1111
// 前置声明
1212
class Service;
1313

14-
#if defined(__GNUC__) && __GNUC__ < 10
15-
#define ServiceClass typename
16-
#else
1714
template <class Derived>
1815
concept ServiceClass = requires(Derived d)
1916
{
2017
std::is_base_of<Service, Derived>::value;
2118
Derived::ServiceIndex;
2219
};
23-
#endif
2420

2521
class LanguageClient: public std::enable_shared_from_this<LanguageClient>
2622
{

include/CodeFormatServer/VSCode.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
#include <vector>
55
#include <type_traits>
66
#include <nlohmann/json.hpp>
7-
#if defined(__GNUC__) && __GNUC__ < 10
8-
#else
97
#include <compare>
10-
#endif
8+
119
// 命名风格和vscode一样
1210

1311
namespace vscode

0 commit comments

Comments
 (0)