Skip to content

Commit 6c072a2

Browse files
committed
cleanup: Drop compat bits for not-quite-C++14 compilers
1 parent 5bcb734 commit 6c072a2

File tree

5 files changed

+1
-84
lines changed

5 files changed

+1
-84
lines changed

BUILD.bazel

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ cc_binary(
5252
":lib/src/jvmMain/cpp/jni.h",
5353
":lib/src/jvmMain/cpp/jni_md.h",
5454
],
55-
copts = [
56-
"-DHAVE_TO_STRING",
57-
],
5855
includes = [
5956
"lib/src/jvmMain/cpp",
6057
"lib/src/jvmMain/proto",

lib/src/jvmMain/cpp/CMakeLists.txt

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -17,48 +17,6 @@ find_package(JNI)
1717

1818
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
1919

20-
#
21-
# C++ standard library features
22-
#
23-
24-
include(CheckCXXSourceCompiles)
25-
26-
# ::gets
27-
check_cxx_source_compiles(
28-
"
29-
#include <cstdio>
30-
using ::gets;
31-
int main() {}
32-
"
33-
HAVE_GETS)
34-
if(HAVE_GETS)
35-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_GETS=1")
36-
endif()
37-
38-
# std::make_unique
39-
check_cxx_source_compiles(
40-
"
41-
#include <memory>
42-
using std::make_unique;
43-
int main() {}
44-
"
45-
HAVE_MAKE_UNIQUE)
46-
if(HAVE_MAKE_UNIQUE)
47-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_MAKE_UNIQUE=1")
48-
endif()
49-
50-
# std::to_string
51-
check_cxx_source_compiles(
52-
"
53-
#include <string>
54-
using std::to_string;
55-
int main() {}
56-
"
57-
HAVE_TO_STRING)
58-
if(HAVE_TO_STRING)
59-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_TO_STRING=1")
60-
endif()
61-
6220
#
6321
# Build
6422
#
@@ -101,7 +59,6 @@ add_library(
10159
ToxCrypto/ToxCrypto.cpp
10260
ToxCrypto/ToxCrypto.h
10361
Tox4j.cpp
104-
cpp14compat.h
10562
tox4j/ToxInstances.h
10663
tox4j/Tox4j.h
10764
tox/av.cpp

lib/src/jvmMain/cpp/cpp14compat.h

Lines changed: 0 additions & 34 deletions
This file was deleted.

lib/src/jvmMain/cpp/tox4j/Tox4j.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#pragma once
22

3-
#include "cpp14compat.h"
4-
53
#include "ToxInstances.h"
64
#include "util/jni/ArrayFromJava.h"
75
#include "util/jni/ArrayToJava.h"

lib/src/jvmMain/cpp/util/wrap_void.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#pragma once
22

3+
#include <type_traits>
34
#include <utility>
45

5-
#include "cpp14compat.h"
6-
76
/**
87
* Helper template to capture the return value of a function call so that
98
* functions returning void can be treated the same way as non-void ones.

0 commit comments

Comments
 (0)