@@ -185,10 +185,10 @@ BENCHMARK(BM_test)->Unit(benchmark::kMillisecond);
185185
186186#ifdef CODSPEED_ENABLED
187187#include < codspeed.h>
188- #include < measurement.hpp>
189188
190189#include < filesystem>
191- #endif // CODSPEED_ENABLED
190+ #include < measurement.hpp>
191+ #endif // CODSPEED_ENABLED
192192
193193#if defined(_MSC_VER)
194194#include < intrin.h> // for _ReadWriteBarrier
@@ -947,7 +947,7 @@ class BENCHMARK_EXPORT BENCHMARK_INTERNAL_CACHELINE_ALIGNED State {
947947 public:
948948 const IterationCount max_iterations;
949949#ifdef CODSPEED_INSTRUMENTATION
950- codspeed::CodSpeed * codspeed_;
950+ codspeed::CodSpeed* codspeed_;
951951#endif
952952
953953 private:
@@ -970,11 +970,11 @@ class BENCHMARK_EXPORT BENCHMARK_INTERNAL_CACHELINE_ALIGNED State {
970970 internal::ThreadTimer* timer, internal::ThreadManager* manager,
971971 internal::PerfCountersMeasurement* perf_counters_measurement,
972972 ProfilerManager* profiler_manager
973- #ifdef CODSPEED_INSTRUMENTATION
973+ #ifdef CODSPEED_INSTRUMENTATION
974974 ,
975- codspeed::CodSpeed * codspeed = NULL
976- #endif
977- );
975+ codspeed::CodSpeed* codspeed = NULL
976+ #endif
977+ );
978978
979979 void StartKeepRunning ();
980980 // Implementation of KeepRunning() and KeepRunningBatch().
@@ -1459,27 +1459,20 @@ class Fixture : public internal::Benchmark {
14591459#define BENCHMARK_PRIVATE_CONCAT_NAME (BaseClass, Method ) \
14601460 BaseClass##_##Method##_Benchmark
14611461
1462- #ifdef _MSC_VER
14631462#define BENCHMARK_PRIVATE_DECLARE (n ) \
14641463 /* NOLINTNEXTLINE(misc-use-anonymous-namespace) */ \
14651464 static ::benchmark::internal::Benchmark const * const BENCHMARK_PRIVATE_NAME ( \
1466- n)
1467- #else
1468- #define BENCHMARK_PRIVATE_DECLARE (n ) \
1469- /* NOLINTNEXTLINE(misc-use-anonymous-namespace) */ \
1470- static ::benchmark::internal::Benchmark const * const BENCHMARK_PRIVATE_NAME ( \
1471- n) [[maybe_unused]]
1472- #endif
1465+ n) #ifnedef _MSC_VER [[maybe_unused]] #endif
14731466
14741467#ifdef CODSPEED_ENABLED
1475- #define CUR_FILE \
1476- codspeed::get_path_relative_to_workspace (__FILE__) + "::"
1468+ #define CUR_FILE codspeed::get_path_relative_to_workspace (__FILE__) + "::"
14771469#ifdef _MSC_VER
1478- #define NAMESPACE std::string (" " )
1479- #else
1470+ // MSVC does not support __PRETTY_FUNCTION__, this is a hack to make it compile
1471+ // for now
1472+ #define __PRETTY_FUNCTION__ " unsupported"
1473+ #endif
14801474#define NAMESPACE \
14811475 (([]() { return codspeed::extract_lambda_namespace (__PRETTY_FUNCTION__); })())
1482- #endif
14831476#define STATIC_NAMESPACE_STRING (name ) static std::string name = NAMESPACE;
14841477
14851478#define FILE_AND_NAMESPACE CUR_FILE + NAMESPACE
@@ -1618,12 +1611,12 @@ class Fixture : public internal::Benchmark {
16181611#ifdef CODSPEED_ENABLED
16191612
16201613#define BENCHMARK_PRIVATE_DECLARE_F (BaseClass, Method ) \
1621- STATIC_NAMESPACE_STRING (ns_##BaseClass##_##Method); \
1614+ STATIC_NAMESPACE_STRING (ns_##BaseClass##_##Method); \
16221615 class BaseClass ##_##Method##_Benchmark : public BaseClass { \
16231616 public: \
16241617 BaseClass##_##Method##_Benchmark() { \
16251618 this ->SetName (CUR_FILE + ns_##BaseClass##_##Method + \
1626- #Method " [" #BaseClass " ]" ); \
1619+ #Method " [" #BaseClass " ]" ); \
16271620 } \
16281621 \
16291622 protected: \
@@ -1669,7 +1662,7 @@ class Fixture : public internal::Benchmark {
16691662 void BenchmarkCase (::benchmark::State&) override ; \
16701663 };
16711664
1672- #else // CODSPEED_ENABLED undefined:
1665+ #else // CODSPEED_ENABLED undefined:
16731666
16741667#define BENCHMARK_PRIVATE_DECLARE_F (BaseClass, Method ) \
16751668 class BaseClass ##_##Method##_Benchmark : public BaseClass { \
0 commit comments