File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -207,6 +207,10 @@ class optional
207207 // ! Assigns content from an optional.
208208 optional& operator =(
209209 const optional& opt)
210+ #if defined(__GNUC__) && __GNUC__ == 12
211+ __attribute__ (
212+ (noinline))
213+ #endif // if defined(__GNUC__) && __GNUC__ == 12
210214 {
211215 reset ();
212216 storage_.engaged_ = opt.storage_ .engaged_ ;
@@ -304,7 +308,7 @@ class optional
304308 *
305309 * @return The contained value.
306310 */
307- T&& operator *() && noexcept
311+ T && operator *() && noexcept
308312 {
309313 return std::move (storage_.val_ );
310314 }
@@ -316,7 +320,7 @@ class optional
316320 *
317321 * @return The contained value.
318322 */
319- const T&& operator *() const && noexcept
323+ const T && operator *() const && noexcept
320324 {
321325 return std::move (storage_.val_ );
322326 }
You can’t perform that action at this time.
0 commit comments