Skip to content

Commit 88139fe

Browse files
committed
兼容较低版本gcc
1 parent 3f0047e commit 88139fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/CodeFormatServer/LanguageClient.h

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

14+
#if defined(__GNUC__) && __GNUC__ < 10
15+
#define ServiceClass typename
16+
#else
1417
template <class Derived>
1518
concept ServiceClass = requires(Derived d)
1619
{
1720
std::is_base_of<Service, Derived>::value;
1821
Derived::ServiceIndex;
1922
};
23+
#endif
2024

2125
class LanguageClient: public std::enable_shared_from_this<LanguageClient>
2226
{

0 commit comments

Comments
 (0)