METATEST_DEFINE_TO_STREAM_FOR_TEMPLATE_WITH_DEFAULTS

Synopsis

#define METATEST_DEFINE_TO_STREAM_FOR_TEMPLATE_WITH_DEFAULTS(
  min_arg_num,
  max_arg_num,
  name,
  display_name
) \
  // unspecified

Description

Defines an overload of to_stream for instances of the template name taking max_arg_num arguments. The last max_arg_num - min_arg_num template arguments have default values, thus the template can be instantiated with min_arg_num, min_arg_num + 1, ... max_arg_num number of arguments. min_arg_num and max_arg_num are integer values. display_name is a constant expression that can be displayed in a stream using operator<<. It is displayed as the name of the template. to_stream is called recursively for the template arguments.

#include <metatest/to_stream_fwd.hpp>

Example

template <class A, class B = int, class C = int>
class custom_template;

METATEST_DEFINE_TO_STREAM_FOR_TEMPLATE_WITH_DEFAULTS(
  1,
  3,
  custom_template,
  "custom_template"
)

[up]