文件名称:XR
介绍说明--下载内容均来自于网络,请自行研究使用
XR头文件,C++中输出流的替代头文件,可以直接输出表达式的值已经要说的话-#ifndef EXPRESSION_RESULT
#define EXPRESSION_RESULT
#include <iostream>
#include <iomanip>
namespace zjun {
class line_number {
private:
int num
int width
public:
line_number(int n, int w):num(n), width(w) {}
friend std::ostream& operator << (std::ostream& os, const line_number& rhs) {
os << "#" << std::setw(rhs.width) << std::setfill( 0 ) << rhs.num
<< std::setfill( )
return os
}
}
}
#ifndef NDEBUG
#define XR(expr) std::cout << zjun::line_number(__LINE__, 2) << ": " <<#expr << /*std::flush <<*/ "\t==>" std::cout << std::boolalpha << (expr) << std::noboolalpha << std::endl
#define XRv(expr) std::cout << zjun::line_number(__LINE__, 2) << ": " <<#expr << /*std::flush <<*/ "\t==>" expr
#define XRdctor(class_name) std::cout <<
#define EXPRESSION_RESULT
#include <iostream>
#include <iomanip>
namespace zjun {
class line_number {
private:
int num
int width
public:
line_number(int n, int w):num(n), width(w) {}
friend std::ostream& operator << (std::ostream& os, const line_number& rhs) {
os << "#" << std::setw(rhs.width) << std::setfill( 0 ) << rhs.num
<< std::setfill( )
return os
}
}
}
#ifndef NDEBUG
#define XR(expr) std::cout << zjun::line_number(__LINE__, 2) << ": " <<#expr << /*std::flush <<*/ "\t==>" std::cout << std::boolalpha << (expr) << std::noboolalpha << std::endl
#define XRv(expr) std::cout << zjun::line_number(__LINE__, 2) << ": " <<#expr << /*std::flush <<*/ "\t==>" expr
#define XRdctor(class_name) std::cout <<
(系统自动生成,下载前可以参看下载内容)
下载文件列表
XR.hpp