ftd://2004.07.22/1327CST
URL: http://www.gotw.ca/gotw/020.htm Comment: Fascinating! Got this while searching for short-circuit evaluation for C++ (saw your reply in gamedev)
What about if cSalary's operator() creates a temporary object? That temporary object could throw. That's technically two throws. But of course you could extend this reasoning forever. I guess you have to consider their Assumption b). Anyway, calling e.Salary() results in one additional execution path from the standpoint of the function and it can be either: - a member function that simply throws OR - a member function that creates a temporary whose construction could throw OR - an overloaded operator() on a member variable that throws Fun little exercise though. Regards, Jeff
Post new comment
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can use BBCode tags in the text.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor, sorry but we need it to help prevent automated submissions.
"dwine gamps hoods pirog pogey sabal"