Sunday, March 05, 2006

temporary objects as reference arguments (C++)

This is a pain in the arse.

I can't declare the = operator (or a similarly defined set() method) to accept (const Menu::Maker &) and pass it a temporary object, because the method calls a method of that object which does non-const things... and I don't know how to assign the temporary object to a local object and pass that. Argh! so close, yet so far.

1 comment:

  1. Anonymous3/4/06 16:25

    Oh yeah...that's fucking great! :)

    ReplyDelete