ComPPare 1.0.0
Loading...
Searching...
No Matches
comppare Namespace Reference

ComPPare framework main namespace. More...

Namespaces

namespace  internal
 
namespace  plugin
 

Classes

class  config
 Configuration singleton for the ComPPare library. More...
 
class  current_state
 Singleton class for the current state. More...
 
class  InputContext
 InputContext class template to hold input parameters for the comparison framework. More...
 
struct  outspec
 Specification struct for pairing an output type with an error policy. More...
 
struct  outspec< outspec< Value, Policy >, void >
 Partial specialization of outspec for user-defined error policy selection. More...
 
struct  outspec< Value, Policy >
 Partial specialization of outspec for user-defined error policy selection. More...
 
struct  outspec< Value, void >
 Partial specialization of outspec for automatic error policy selection. More...
 

Concepts

concept  OutSpec
 Concept for output specifications being pair of type and policy.
 

Typedefs

template<typename Value , typename Policy >
using set_policy = outspec< Value, Policy >
 Alias for setting the error policy for a type.
 

Functions

template<typename T >
void DoNotOptimize (T const &value)
 Prevents the compiler from optimizing away the given value.
 
template<typename T >
void DoNotOptimize (T &value)
 Prevents the compiler from optimizing away the given value.
 
template<typename T >
void DoNotOptimize (T &&value)
 Prevents the compiler from optimizing away the given value.
 
void ClobberMemory ()
 
template<typename... Outputs, typename... Inputs>
auto make_comppare (Inputs &&...ins)
 Helper function to create a comppare object.
 

Detailed Description

ComPPare framework main namespace.

Typedef Documentation

◆ set_policy

template<typename Value , typename Policy >
using comppare::set_policy = typedef outspec<Value, Policy>

Alias for setting the error policy for a type.

Function Documentation

◆ ClobberMemory()

void comppare::ClobberMemory ( )
inline

◆ DoNotOptimize() [1/3]

template<typename T >
void comppare::DoNotOptimize ( T &&  value)
inline

Prevents the compiler from optimizing away the given value.

Template Parameters
TThe type of the value to protect from optimization.
Parameters
valueThe value to protect from optimization.

This implementation is verbatim from Google Benchmark’s benchmark::DoNotOptimize(), licensed under Apache 2.0. No changes have been made.

◆ DoNotOptimize() [2/3]

template<typename T >
void comppare::DoNotOptimize ( T &  value)
inline

Prevents the compiler from optimizing away the given value.

Template Parameters
TThe type of the value to protect from optimization.
Parameters
valueThe value to protect from optimization.

This implementation is verbatim from Google Benchmark’s benchmark::DoNotOptimize(), licensed under Apache 2.0. No changes have been made.

◆ DoNotOptimize() [3/3]

template<typename T >
void comppare::DoNotOptimize ( T const &  value)
inline

Prevents the compiler from optimizing away the given value.

Template Parameters
TThe type of the value to protect from optimization.
Parameters
valueThe value to protect from optimization.

This implementation is verbatim from Google Benchmark’s benchmark::DoNotOptimize(), licensed under Apache 2.0. No changes have been made.

◆ make_comppare()

template<typename... Outputs, typename... Inputs>
auto comppare::make_comppare ( Inputs &&...  ins)

Helper function to create a comppare object.

This function simplifies the creation of a comppare object by deducing the input types. It takes input arguments and returns an OutputContext object that can be used to add implementations and run comparisons. The output types must be specified explicitly as template parameters, while the input types are deduced from the function arguments. The function arguments are perfectly forwarded to instantiate the OutputContext object.

Template Parameters
OutputsThe types of the output specifications.
InputsThe types of the input specifications – deduced from function arguments.
Parameters
insThe input arguments.
Returns
typename InputContext<Inputs...>::OutputContext<Outputs...>