{"type":"rich","version":"1.0","provider_name":"Transistor","provider_url":"https://transistor.fm","author_name":"Programming Tech Brief By HackerNoon","title":"Temporary Lifetime Extension: Complicated Cases","html":"<iframe width=\"100%\" height=\"180\" frameborder=\"no\" scrolling=\"no\" seamless src=\"https://share.transistor.fm/e/aaac545c\"></iframe>","width":"100%","height":180,"duration":521,"description":"\n        This story was originally published on HackerNoon at: https://hackernoon.com/temporary-lifetime-extension-complicated-cases.\nSoftware design is difficult. One has to design features to fit past and future code. C++ Temporary lifetime extension can teach us a lesson about such design.\nCheck more stories related to programming at: https://hackernoon.com/c/programming.\n            You can also check exclusive content about #c++, #software-design, #learning-c++, #software-engineering, #polymorphism, #legacy, #performance-optimization, #temporary-lifetime-extension,  and more.\nThis story was written by: @bohdanlab. Learn more about this writer by checking @bohdanlab's about page,\n            and for more stories, please visit hackernoon.com.\nThis article shows us two, at the first glance, distinct examples of c++ temporary lifetime extension (TLE) feature behavior. The one where we extend temporary lifetime through polymorphic reference conversion and the one where we do it through bounding a field of a temporary directly to a reference. However, if you look deeper you will see that in some context these two examples are similar. And therefore the feature behavior in both cases should be the same. The consistency is an important aspect of any design which helps users  use the feature and temporary lifetime extension can show it on its own example.","thumbnail_url":"https://img.transistorcdn.com/KhCapPSRkLGL2Xw8888yuChkNRWthaKapLYTvNdu4W4/rs:fill:0:0:1/w:400/h:400/q:60/mb:500000/aHR0cHM6Ly9pbWct/dXBsb2FkLXByb2R1/Y3Rpb24udHJhbnNp/c3Rvci5mbS9zaG93/LzQxMTY2LzE2ODM1/ODIzMzAtYXJ0d29y/ay5qcGc.webp","thumbnail_width":300,"thumbnail_height":300}