We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppose you have this code
template <typename B_G> void back_edge(E e, const B_G&) { log << "back edge " << e << "\t\t : id " << m_graph[e].id << " (" << m_graph[m_graph.source(e)].id << ", " << m_graph[m_graph.target(e)].id << ")" << "\n"; }
and you want to comment out the body of the function to skip the log, and maybe in the future uncomment it, and comment it back again
template <typename B_G> void back_edge(E e, const B_G&) { #if 0 log << "back edge " << e << "\t\t : id " << m_graph[e].id << " (" << m_graph[m_graph.source(e)].id << ", " << m_graph[m_graph.target(e)].id << ")" << "\n"; #endif }
never ever use //:
//
template <typename B_G> void back_edge(E e, const B_G&) { // log << "back edge " << e << "\t\t : id " << m_graph[e].id << " (" // << m_graph[m_graph.source(e)].id << ", " << m_graph[m_graph.target(e)].id << ")" << "\n"; }
Never ever use `/* */:
template <typename B_G> void back_edge(E e, const B_G&) { /* log << "back edge " << e << "\t\t : id " << m_graph[e].id << " (" << m_graph[m_graph.source(e)].id << ", " << m_graph[m_graph.target(e)].id << ")" << "\n"; */ }
With the proper way of commenting out the code, if you want the code back again you just change the 0 to 1:
#if 1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Suppose you have this code
and you want to comment out the body of the function to skip the log, and maybe in the future uncomment it, and comment it back again
never ever use
//
:Never ever use `/* */:
With the proper way of commenting out the code, if you want the code back again you just change the 0 to 1:
The text was updated successfully, but these errors were encountered: