0

When I read the source code of google glog, I found the following macro confusing to me:

#define LOG_IF(severity, condition) \
    static_cast<void>(0),             \
    !(condition) ? (void) 0 : google::LogMessageVoidify() & LOG(severity)
  1. What's the meaning of static_cast<void>(0),?
  2. What's the meaning of & in the third line?
  3. What does the result look like if we expand this macro?

I'm new to c++. Thank you all for the help!

Stack Danny
  • 7,754
  • 2
  • 26
  • 55
Tristan
  • 9
  • 2
  • 1
    it's three different questions, I provide an alternative title – Stack Danny May 24 '19 at 07:10
  • 2
    These are basic constructs of the language that are better learnt from [a good textbook](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list) instead of SO. – R Sahu May 24 '19 at 07:12

0 Answers0