Skip to content

Commit d8d95b6

Browse files
committed
limit build to C++17 capable toolchains only
1 parent ba4ab07 commit d8d95b6

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/AsyncWSocket.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
// A new experimental implementation of Async WebSockets client/server
55

6+
// We target C++17 capable toolchain
7+
#if __cplusplus >= 201703L
68
#include "AsyncWSocket.h"
79
#include "literals.h"
810

@@ -939,3 +941,4 @@ void WSocketServerWorker::_taskRunner(){
939941
vTaskDelete(NULL);
940942
}
941943

944+
#endif // __cplusplus >= 201703L

src/AsyncWSocket.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// A new experimental implementation of Async WebSockets client/server
55

6-
6+
#if __cplusplus >= 201703L
77
#pragma once
88

99
#include "AsyncWebSocket.h"
@@ -945,3 +945,7 @@ class WSocketServerWorker : public WSocketServer {
945945
void _taskRunner();
946946

947947
};
948+
949+
#else // __cplusplus >= 201703L
950+
#warning "WSocket requires C++17, won't build"
951+
#endif // __cplusplus >= 201703L

0 commit comments

Comments
 (0)