c++ - Get file and line of calling function -


i'm trying write class logs calls operator= don't know of away without changing calling code. function signature adjust, might work: how know function called another, don't see how work function operator=. possible?

example class/usage:

template <typename t> class loggingt {     t data;     loggingt& operator=(const loggingt& rhs){         data = rhs;          std::cout << "assigned @ line: "            << ???? << " in file " << ???? << std::endl;     return *this; }; 


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -