You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the case of _bar, the code gives no errors. The compiler is able to promote the temporary into a static. But for _baz, which calls a const fn, the compiler fails to do this, and complains of a temporary being dropped. It is, however, able to do so for _STATIC, which is explicitly declared as a static variable.
Of course, it shouldn't be dropping the temporary here, but promote it to static just like the first line.