---- kpp::kspt::printable << Output Concepts << Output << Kpp c++ ----
kpp::kspt::printable is a c++ concept of kpp c++ library. It requires a type is printable, that the type must satisfy kpp::kspt::ostream_printable or kpp::kspt::register_printable, otherwise the type is not kpp::kspt::printable.
kpp::kspt::printable :
template <typename type_t00, typename ostream_type_t01> concept printable = ...;
#include <kpp/print.hpp> #include <iostream> namespace my_lib { class my_class { private: std::string value = "c++ hi"; public: std::ostream & register_print(std::ostream & ostream__) const { ostream__ << value; return ostream__; } }; } int main() { static_assert(kpp::kspt::printable<int, std::ostream>); static_assert(kpp::kspt::printable<my_lib::my_class, std::ostream>); }