Skip to content

Commit 5036e03

Browse files
committed
fix MSVC breakage
1 parent 3f165ab commit 5036e03

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

bench/fullsort/BM_fullsort.vxsort.h

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define VXSORT_BM_FULLSORT_VXSORT_H
33

44
#include <benchmark/benchmark.h>
5-
#include <cxxabi.h>
65
#include <fmt/format.h>
76
#include <algorithm>
87
#include <magic_enum.hpp>
@@ -11,6 +10,10 @@
1110
#include "../bench_isa.h"
1211
#include "../util.h"
1312

13+
#ifndef VXSORT_COMPILER_MSVC
14+
#include <cxxabi.h>
15+
#endif
16+
1417
#include <vxsort.h>
1518

1619
#include "fullsort_params.h"
@@ -184,7 +187,11 @@ void register_type(i64 s, SortPattern p) {
184187
if constexpr (U >= 2) {
185188
register_type<M, U / 2, T>(s, p);
186189
}
190+
#ifdef VXSORT_COMPILER_MSVC
191+
auto realname = typeid(T).name();
192+
#else
187193
auto realname = abi::__cxa_demangle(typeid(T).name(), nullptr, nullptr, nullptr);
194+
#endif
188195
auto bench_name = fmt::format("BM_vxsort_pattern<{}, {}, {}>/{}/{}", realname, U, s,
189196
magic_enum::enum_name(M), magic_enum::enum_name(p));
190197
::benchmark::RegisterBenchmark(bench_name.c_str(), BM_vxsort_pattern<T, M, U>, s, p)

0 commit comments

Comments
 (0)