cms-sw/cmssw — pull request #1532 by davidlt (2013-11-20 11:27:18+00:00)
Title: Make static a const in SiStripFecCabling::fecs()

I believe here is a problem of pointer/reference. People try to code in C++, but with C in mind. They want to return a const reference, but reference must point to a valid object, there is no such thing as null reference (not allowed by standard). To overcome the issue people started to define dummy statics inside the functions and return a reference to the dummy. It's wrong. The function should return a pointer and callee should return `nullptr` if needed. The caller cannot even handle situation if it gets a reference, it doesn't know if returned reference is valid or not.