chore: use C++20 standard (#410)
As of now sdbus-c++ supports C++20 but does not require it, and the used C++20 features are conditionally compiled depending on whether they are available or not.
This commit is contained in:
1 parent
29e94c3b68
commit
0dc0c87cc9
4 files changed
+27
-19
No files matched your search
+5
-1
@@ -884,7 +884,11 @@ namespace {
|
||||
// Please note that the solution is NOT thread-safe.
|
||||
// Another common solution is global sdbus-c++ startup/shutdown functions, but that would be an intrusive change.
|
||||
|
||||
/*constinit (C++20 keyword) */ static bool pseudoConnectionDestroyed{};
|
||||
#ifdef __cpp_constinit
|
||||
constinit static bool pseudoConnectionDestroyed{};
|
||||
#else
|
||||
static bool pseudoConnectionDestroyed{};
|
||||
#endif
|
||||
|
||||
std::unique_ptr<sdbus::internal::IConnection, void(*)(sdbus::internal::IConnection*)> createPseudoConnection()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user