kblib 0.2.3
General utilities library for modern C++
visitation_benchmarks.cpp File Reference
#include "kblib/poly_obj.h"
#include "catch.hpp"
Include dependency graph for visitation_benchmarks.cpp:

Go to the source code of this file.

Macros

#define CATCH_CONFIG_ENABLE_BENCHMARKING
 
#define MAKE_DERIVED2(Number, Expr)
 
#define MAKE_DERIVED(Number, Expr)   MAKE_DERIVED2(Number, Expr)
 

Functions

 TEST_CASE ("poly_obj performance(4_old)")
 

Macro Definition Documentation

◆ CATCH_CONFIG_ENABLE_BENCHMARKING

#define CATCH_CONFIG_ENABLE_BENCHMARKING

Definition at line 20 of file visitation_benchmarks.cpp.

◆ MAKE_DERIVED

#define MAKE_DERIVED (   Number,
  Expr 
)    MAKE_DERIVED2(Number, Expr)

Definition at line 85 of file visitation_benchmarks.cpp.

◆ MAKE_DERIVED2

#define MAKE_DERIVED2 (   Number,
  Expr 
)
Value:
auto fptr_d##Number(const fptr* p) noexcept->unsigned { \
const auto x = p->member; \
return Expr; \
} \
struct Derived##Number final : Base { \
auto operator()() const noexcept -> unsigned override { \
return Expr; \
} \
unsigned x; \
Derived##Number(unsigned i) \
: x(i) {} \
}

Definition at line 72 of file visitation_benchmarks.cpp.

Function Documentation

◆ TEST_CASE()

TEST_CASE ( "poly_obj performance(4_old)"  )

Definition at line 230 of file visitation_benchmarks.cpp.