ape  0.5.0
Audio Programming Environment
Friends | List of all members
ape::PrintFormatter< Derived > Struct Template Reference

Helper type to automatically support formatted printing for user defined types through print() More...

#include <print.h>

Friends

std::to_chars_result to_chars (char *begin, char *end, const Derived &type)
 

Detailed Description

template<typename Derived>
struct ape::PrintFormatter< Derived >

Helper type to automatically support formatted printing for user defined types through print()

class MyCustomType : PrintFormatter<MyCustomType>
{
public:
bool format(char* begin, char* end, char** newBegin) const
{
*newBegin = begin + std::sprintf(begin, "MyCustomType");
return true;
}
};

Friends And Related Function Documentation

◆ to_chars

template<typename Derived >
std::to_chars_result to_chars ( char *  begin,
char *  end,
const Derived &  type 
)
friend

The documentation for this struct was generated from the following file:
sprintf
int sprintf(char *buffer, const char *fmt,...)
Print to a string buffer. This function is inherently unsafe, but may prove useful for particular for...
ape::detail::format
char * format(const T &val, char *b, char *e)
Definition: print.h:40