When are temporaries created as part of a function call destroyed?

后端 未结 4 1064
-上瘾入骨i
-上瘾入骨i 2021-01-01 13:14

Is a temporary created as part of an argument to a function call guaranteed to stay around until the called function ends, even if the temporary isn\'t passed directly to th

4条回答
  •  离开以前
    2021-01-01 13:58

    The temporary lasts until the end of the expression it is part of - which in this case is a function call.

提交回复
热议问题