On Thu, Dec 10, 2009 at 3:02 PM, Shall be Unnamed <@google.com> wrote:
> On Thu, Dec 10, 2009 at 2:29 PM, Marc-Antoine Ruel <[email protected]>wrote: > >> On Thu, Dec 10, 2009 at 2:24 PM, Peter Kasting <[email protected]> >> wrote: >> >> On Thu, Dec 10, 2009 at 11:20 AM, Jacob Mandelson <[email protected]> >>> wrote: >>> >>>> If something extra in an expression is a common case, I've sometimes >>>> seen it done like: >>>> return DoWork(&foo) POSIX_ONLY(&& DoWork(&posix_specific)); >>>> where POSIX_ONLY will expand to nothing or its argument. >>>> It's ugly, but compact. >>> >>> >>> The Google C++ Style Guide says to avoid macros when there is a non-macro >>> way to do the same thing. >>> >> >> Sanity says that too. >> >> Scott's technique is the best. If you can't figure out what's happening by >> glancing at the code, it's not code, it's assembly. >> > > I'd say: > > "If you can't figure out what's happening by glancing at the code, it's not > code, it's template metaprogramming." > > Assembly is easy! > > [Makes a face in the general direction of Herb Sutter.] > LOL Were you looking at src/base/singleton.h lately? M-A -- Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev
