X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fstream.h;h=1555d98dc776b653e3be7830155c6171ec0f561d;hb=47f45992107361ad58c170bdf78fdc92523fab06;hp=558b2790b53c3360a3a03ad1d3260d7c5ad2f62a;hpb=b0ef8cb4b2a4056fc7df7c16aa6a170edb4dea34;p=m6w6%2Flibmemcached diff --git a/libtest/stream.h b/libtest/stream.h index 558b2790..1555d98d 100644 --- a/libtest/stream.h +++ b/libtest/stream.h @@ -1,8 +1,8 @@ /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: - * - * uTest, libtest * - * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -51,6 +51,20 @@ template class cerr { private: + public: + typedef std::basic_ostringstream stream_buffer; + + public: + void operator()(const stream_buffer &s) + { + std::cerr << s.str() << std::endl; + } + }; + +template + class make_cerr { + private: + public: typedef std::basic_ostringstream stream_buffer; @@ -85,7 +99,7 @@ template public: void operator()(const stream_buffer &s) { - std::cerr << s.str() << std::endl; + std::cerr<< s.str() << std::endl; } }; @@ -95,6 +109,7 @@ template