[ox/std] Fix Linux build

This commit is contained in:
Gary Talent 2021-05-09 22:36:37 -05:00
parent 8dcd350671
commit 0bcb78d3da
2 changed files with 8 additions and 2 deletions

View File

@ -54,6 +54,7 @@ target_compile_definitions(
target_link_libraries(
OxStd PUBLIC
$<$<BOOL:${OX_USE_STDLIB}>:dl>
$<$<CXX_COMPILER_ID:GNU>:gcc>
OxTraceHook
)

View File

@ -40,13 +40,18 @@ constexpr const char *stringify(const String &s) noexcept {
}
#if __has_include(<string>)
constexpr const char *stringify(const std::string &s) noexcept {
#if __cplusplus >= 202002L
constexpr
#else
inline
#endif
const char *stringify(const std::string &s) noexcept {
return s.c_str();
}
#endif
#if __has_include(<QString>)
constexpr const char *stringify(const QString &s) noexcept {
inline const char *stringify(const QString &s) noexcept {
return s.toUtf8();
}
#endif