aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Pugin <egor.pugin@gmail.com>2019-12-03 04:14:16 +0300
committerVictor Zverovich <victor.zverovich@gmail.com>2019-12-03 05:55:04 -0800
commit1a599117d8ef331e68eb0d808d1fa04a48b1fcf2 (patch)
treeae45bb36418d28ff938f8c651827daaf8e2c6410
parentb160123e39cf9ceed8b18a2d8bacdef22033e11b (diff)
downloadfmtlib-1a599117d8ef331e68eb0d808d1fa04a48b1fcf2.tar.gz
Export assert_fail with FMT_API. This fixes dll build.
-rw-r--r--include/fmt/core.h2
-rw-r--r--include/fmt/format-inl.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/fmt/core.h b/include/fmt/core.h
index d49f36e6..80e87e21 100644
--- a/include/fmt/core.h
+++ b/include/fmt/core.h
@@ -229,7 +229,7 @@ namespace internal {
// A workaround for gcc 4.8 to make void_t work in a SFINAE context.
template <typename... Ts> struct void_t_impl { using type = void; };
-void assert_fail(const char* file, int line, const char* message);
+FMT_API void assert_fail(const char* file, int line, const char* message);
#ifndef FMT_ASSERT
# ifdef NDEBUG
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h
index 72b30466..21caeec9 100644
--- a/include/fmt/format-inl.h
+++ b/include/fmt/format-inl.h
@@ -55,7 +55,7 @@ inline fmt::internal::null<> strerror_s(char*, std::size_t, ...) { return {}; }
FMT_BEGIN_NAMESPACE
namespace internal {
-FMT_FUNC void assert_fail(const char* file, int line, const char* message) {
+FMT_API FMT_FUNC void assert_fail(const char* file, int line, const char* message) {
print(stderr, "{}:{}: assertion failed: {}", file, line, message);
std::abort();
}