<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>modern C++: write my own function that returns true / false, and a value or error message - part 1 (embedded friendly)</title><link>/technologies/code_exchange/b/blog/posts/modern-c-write-my-own-function-that-returns-true-false-and-a-value-or-error-message</link><description>I&amp;#39;m experimenting with new C++ constructs. GCC 15 implements an interesting concept of the C++26 standard: A function can return a status, and either a value or an error message. In a previous post I tested one of C++ standard function...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: modern C++: write my own function that returns true / false, and a value or error message - part 1 (embedded friendly)</title><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/modern-c-write-my-own-function-that-returns-true-false-and-a-value-or-error-message</link><pubDate>Sat, 01 Mar 2025 23:02:28 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:7225649c-327e-4e5c-946b-4ed9ed740d18</guid><dc:creator>vmate</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Check out `expected` in C++23, it is very similar to rust&amp;#39;s `Result` type, made specifically for what you&amp;#39;re trying to do.&lt;br /&gt;&lt;a href="https://en.cppreference.com/w/cpp/utility/expected" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;en.cppreference.com/.../expected&lt;/a&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28745&amp;AppID=74&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>