Line data Source code
1 : // This file (TLOG_ENTEX.cc) was created by Ron Rechenmacher <ron@fnal.gov> on
2 : // Mar 2, 2024. "TERMS AND CONDITIONS" governing this file are in the README
3 : // or COPYING file. If you do not have such a file, one can be obtained by
4 : // contacting Ron or Fermi Lab in Batavia IL, 60510, phone: 630-840-3000.
5 : // $RCSfile: .emacs.gnu,v $
6 : // rev="$Revision: 1.35 $$Date: 2023/10/14 17:08:08 $";
7 :
8 : #include "TRACE/trace.h"
9 :
10 : #if __cplusplus < 201703L
11 : # define TLOG_ENTEX(...) std::cout << ""
12 : # define TRACE_EXIT if (0)
13 : #endif
14 :
15 0 : int sub1(int x)
16 : {
17 0 : int retval= x + 1;
18 0 : TLOG_DEBUG() << "x=" << x;
19 0 : TRACE_EXIT { TLOG_DEBUG(1) << "returning retval=" << retval; };
20 0 : return retval;
21 : }
22 :
23 0 : int main(/*int argc, char *argv[]*/)
24 : {
25 : #if __cplusplus < 201703L
26 0 : TLOG() << "Must compile with C++17 or higher";
27 0 : exit(1);
28 : #endif
29 : TRACE_CNTL("lvlsetS", (1 << TLVL_DEBUG) | (1 << (TLVL_DEBUG + 1)));
30 : int retval= 0;
31 : TLOG_ENTEX(0);
32 : TLOG_DEBUG() << "sub1(1)=" << sub1(1);
33 : return retval;
34 : } // main
|