This has been sinking in since yesterday. There are many places in our codebase where developer used a reference for perf benefits, and then conditionally initialized it like this. OUCH!
-
-
-
template <typename T> T& ref_or_default(bool cond, T& val) { static T default_val; return cond ? val : default_val; }
Kraj razgovora
Novi razgovor -
-
-
Are you going to explain this for those of us who aren't seeing it? Please?
-
Assuming I got it right: Ternary ? has single return value type, which should be Object. So what needs to happen to obj?
- Još 1 odgovor
Novi razgovor -
-
-
Does that copy at least stay alive because reference lifetime extension applies here, or do we end up with a dangling ref?
-
well at least the temporary's lifetime is properly extended, but still, there's a copy
- Još 1 odgovor
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.