Skip to content

Commit

Permalink
windows: shim in linb.any due to no support for std.any.
Browse files Browse the repository at this point in the history
* some sort of bug exists where MSVC's 'std.any' is not importable
  into swift, due to its modulemap specifying 'requires cplusplus17'
  even though we are using 'cxxLanguageStandard: .cxx17'.

Signed-off-by: furby™ <devs@wabi.foundation>
  • Loading branch information
furby-tm committed Nov 1, 2024
1 parent 42a1283 commit 958eedf
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
12 changes: 11 additions & 1 deletion Sources/Tf/diagnosticMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,17 @@
#include <signal.h>
#include <stdlib.h>

#include <any>
#if defined(_WIN32) || defined(__ANDROID__)
# include <any/any.hpp>

namespace std
{
using namespace linb;
}
#else // !defined(_WIN32) && !defined(__ANDROID__)
# include <any>
#endif // defined(_WIN32) || defined(__ANDROID__)

#include <memory>
#include <thread>

Expand Down
12 changes: 11 additions & 1 deletion Sources/Tf/include/Tf/diagnosticBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@
#include "Arch/function.h"
#include "Arch/inttypes.h"

#include <any>
#if defined(_WIN32) || defined(__ANDROID__)
# include <any/any.hpp>

namespace std
{
using namespace linb;
}
#else // !defined(_WIN32) && !defined(__ANDROID__)
# include <any>
#endif // defined(_WIN32) || defined(__ANDROID__)

#include <cstdarg>
#include <string>

Expand Down
12 changes: 11 additions & 1 deletion Sources/Tf/include/Tf/diagnosticHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@
// incompatible macro definitions in pyport.h on macOS.
#include <locale>

#include <any>
#if defined(_WIN32) || defined(__ANDROID__)
# include <any/any.hpp>

namespace std
{
using namespace linb;
}
#else // !defined(_WIN32) && !defined(__ANDROID__)
# include <any>
#endif // defined(_WIN32) || defined(__ANDROID__)

#include <string>

// Follow up changes should more tightly scope these to just where it's needed
Expand Down

0 comments on commit 958eedf

Please sign in to comment.