metates::to_stream_argument_list

Synopsis

template <
  class T1,
  // ...
  class Tn
>
struct to_stream_argument_list
{
  static std::ostream& run(std::ostream&);
  // unspecified
};

Description

Tool for pretty-printing template arguments of a template instance. It takes the arguments of the instance as template arguments and uses to_stream for pretty-printing them.

#include <metatest/to_stream_argument_lis_argument_list.hpp>

Example

template <class A, class B>
struct plus
{
  // implementation of the plus metafunction
  
  struct to_stream
  {
    // display "plus<A, B>"
    static std::ostream& run(std::ostream& o)
    {
      o << "plus<";
      to_stream_argument_list<A, B>::run(o);
      return o << ">";
    }
  };
}

[up]