Michele De Stefano's C++ Utilities
echo.hpp
Go to the documentation of this file.
1 // mds_utils/echo.hpp
2 //
3 // Copyright (c) 2009 - Michele De Stefano (micdestefano@users.sourceforge.net)
4 //
5 // Distributed under the MIT License (See accompanying file LICENSE)
6 
7 #ifndef MDS_UTILS_ECHO_HPP_INCLUDED
8 #define MDS_UTILS_ECHO_HPP_INCLUDED
9 
26 #include <iostream>
27 
38 #define MDS_UTILS_ECHO(a) \
39  std::cout << #a << std::endl; \
40  a
41 
53 #define MDS_UTILS_ECHO_RESULT(a) \
54  std::cout << #a << " = " << a << std::endl
55 
56 #endif