Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6c62d35

Browse files
committed
Fix compiler issues for GNU
1 parent 6c3b231 commit 6c62d35

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

‎data/languages/cpp/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ set(CMAKE_CXX_STANDARD 20)
44
set(CMAKE_CXX_STANDARD_REQUIRED True)
55
set(JSON_BuildTests OFF CACHE INTERNAL "")
66

7+
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
8+
# Add GCC-specific flags here.
9+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fconcepts")
10+
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
11+
# Add Clang-specificflags here.
12+
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
13+
# Add MSVC-specific flags here.
14+
endif()
15+
716
project(solution
817
DESCRIPTION "Open Source version of LeetCode"
918
LANGUAGES CXX

‎data/languages/cpp/comparator.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#ifndef COMPARATOR_H
22
#define COMPARATOR_H
33

4+
#include <algorithm>
45
#include <string>
6+
#include <type_traits>
57
#include <vector>
68

79
struct Comparator {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /