{"id":10444,"date":"2024-12-16T11:25:19","date_gmt":"2024-12-16T11:25:19","guid":{"rendered":"https:\/\/www.modernescpp.com\/?p=10444"},"modified":"2025-07-04T16:06:05","modified_gmt":"2025-07-04T16:06:05","slug":"stdexecution-sender","status":"publish","type":"post","link":"https:\/\/www.modernescpp.com\/index.php\/stdexecution-sender\/","title":{"rendered":"std::execution: Sender"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><code>std::execution <\/code>offers three types of senders: factories, adapters, and consumers. I&#8217;ll take a closer look at these today.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"491\" src=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Timeexecution-1.png\" alt=\"\" class=\"wp-image-10449\" srcset=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Timeexecution-1.png 711w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Timeexecution-1-300x207.png 300w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Timeexecution-1-705x487.png 705w\" sizes=\"auto, (max-width: 711px) 100vw, 711px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Most of the following content is from proposal <a href=\"https:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2024\/p2300r10.html\">P2300R10<\/a>. I will try to represent it more concisely.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Sender_Factory\"><\/span>Sender Factory<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A sender factory is an algorithm<em> <\/em>that takes no senders as parameters and returns a sender.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"execution_schedule\"><\/span><code>execution::schedule <\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<!-- HTML generated using hilite.me --><div style=\"background: #f0f3f3; overflow:auto;width:auto;gray;border-width:.1em .1em .1em .8em\"><pre style=\"margin: 0; line-height: 125%\">execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> schedule(\n    execution<span style=\"color: #555555\">::<\/span>scheduler <span style=\"color: #006699; font-weight: bold\">auto<\/span> scheduler\n);\n<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Returns a sender, which starts on the provided scheduler.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"739\" height=\"176\" src=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/schedulepng-.png\" alt=\"\" class=\"wp-image-10460\" style=\"width:600px\" srcset=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/schedulepng-.png 739w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/schedulepng--300x71.png 300w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/schedulepng--705x168.png 705w\" sizes=\"auto, (max-width: 739px) 100vw, 739px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"execution_just\"><\/span><code>execution::just<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<!-- HTML generated using hilite.me --><div style=\"background: #f0f3f3; overflow:auto;width:auto;gray;border-width:.1em .1em .1em .8em\"><pre style=\"margin: 0; line-height: 125%\">execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> just(\n    <span style=\"color: #006699; font-weight: bold\">auto<\/span> ...<span style=\"color: #555555\">&amp;&amp;<\/span> values\n);\n<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Returns a sender, which sends the provided values.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"826\" height=\"142\" src=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Just.png\" alt=\"\" class=\"wp-image-10461\" style=\"width:600px\" srcset=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Just.png 826w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Just-300x52.png 300w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Just-768x132.png 768w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Just-705x121.png 705w\" sizes=\"auto, (max-width: 826px) 100vw, 826px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"execution_just_error\"><\/span><code>execution::just_error <\/code> <span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<!-- HTML generated using hilite.me --><div style=\"background: #f0f3f3; overflow:auto;width:auto;gray;border-width:.1em .1em .1em .8em\"><pre style=\"margin: 0; line-height: 125%\">execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> just_error(\n    <span style=\"color: #006699; font-weight: bold\">auto<\/span> <span style=\"color: #555555\">&amp;&amp;<\/span> error\n);\n<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Returns a sender, which completes with the specific error.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"execution_just_stopped\"><\/span><code>execution::just_stopped<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<!-- HTML generated using hilite.me --><div style=\"background: #f0f3f3; overflow:auto;width:auto;gray;border-width:.1em .1em .1em .8em\"><pre style=\"margin: 0; line-height: 125%\">execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> just_stopped();\n<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><br>Returns a sender, which completes immediately by calling the receiver\u2019s <code>set_stopped<\/code>. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"execution_read_env\"><\/span><code>execution::read_env<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<!-- HTML generated using hilite.me --><div style=\"background: #f0f3f3; overflow:auto;width:auto;gray;border-width:.1em .1em .1em .8em\"><pre style=\"margin: 0; line-height: 125%\">execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> read_env(<span style=\"color: #006699; font-weight: bold\">auto<\/span> tag);\n<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><br>Returns a sender that reaches into a receiver\u2019s environment and pulls out the current value associated with the environment value<code> tag<\/code>. It then sends the value read back to the receiver through the value channel. For instance, <code>read_env(get_scheduler)<\/code> is a sender that asks the receiver for the currently suggested <code>scheduler<\/code> and passes it to the receiver\u2019s <code>set_value<\/code> completion-signal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This can be useful when scheduling nested dependent work. The following sender pulls the current scheduler into the value channel and then schedules more work onto it.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"739\" height=\"242\" src=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/ReadEnvironment.png\" alt=\"\" class=\"wp-image-10462\" style=\"width:600px\" srcset=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/ReadEnvironment.png 739w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/ReadEnvironment-300x98.png 300w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/ReadEnvironment-705x231.png 705w\" sizes=\"auto, (max-width: 739px) 100vw, 739px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Sender_Adaptor\"><\/span>Sender Adaptor <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A sender adaptor is an algorithm that takes one or more senders as parameters and returns a sender.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sender adaptors are lazy. Sender consumers such as <code>this_thread::sync_wait <\/code>start senders.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"execution_continues_on\"><\/span><code>execution::continues_on<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<!-- HTML generated using hilite.me --><div style=\"background: #f0f3f3; overflow:auto;width:auto;gray;border-width:.1em .1em .1em .8em\"><pre style=\"margin: 0; line-height: 125%\">execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> continues_on(\n    execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> input,\n    execution<span style=\"color: #555555\">::<\/span>scheduler <span style=\"color: #006699; font-weight: bold\">auto<\/span> scheduler\n);\n<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Returns a sender describing the transition from the execution agent of the input sender to the execution agent of the target scheduler.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"899\" height=\"260\" src=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Continuouson.png\" alt=\"\" class=\"wp-image-10466\" style=\"width:600px\" srcset=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Continuouson.png 899w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Continuouson-300x87.png 300w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Continuouson-768x222.png 768w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/Continuouson-705x204.png 705w\" sizes=\"auto, (max-width: 899px) 100vw, 899px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"execution_then\"><\/span><code>execution::then<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<!-- HTML generated using hilite.me --><div style=\"background: #f0f3f3; overflow:auto;width:auto;gray;border-width:.1em .1em .1em .8em\"><pre style=\"margin: 0; line-height: 125%\">execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> then(\n    execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> input,\n    std<span style=\"color: #555555\">::<\/span>invocable<span style=\"color: #555555\">&lt;<\/span>values<span style=\"color: #555555\">-<\/span>sent<span style=\"color: #555555\">-<\/span>by(input)...<span style=\"color: #555555\">&gt;<\/span> function\n);\n<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><code>then<\/code> returns a sender describing the task graph described by the input sender, with an added node of invoking the provided function with the values sent by the input sender as arguments.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"727\" height=\"220\" src=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/then.png\" alt=\"\" class=\"wp-image-10471\" style=\"width:600px\" srcset=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/then.png 727w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/then-300x91.png 300w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2024\/12\/then-705x213.png 705w\" sizes=\"auto, (max-width: 727px) 100vw, 727px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"execution_upon\"><\/span><code>execution::upon_*<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<!-- HTML generated using hilite.me --><div style=\"background: #f0f3f3; overflow:auto;width:auto;gray;border-width:.1em .1em .1em .8em\"><pre style=\"margin: 0; line-height: 125%\">execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> upon_error(\n    execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> input,\n    std<span style=\"color: #555555\">::<\/span>invocable<span style=\"color: #555555\">&lt;<\/span>errors<span style=\"color: #555555\">-<\/span>sent<span style=\"color: #555555\">-<\/span>by(input)...<span style=\"color: #555555\">&gt;<\/span> function\n);\n\nexecution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> upon_stopped(\n    execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> input,\n    std<span style=\"color: #555555\">::<\/span>invocable <span style=\"color: #006699; font-weight: bold\">auto<\/span> function\n);\n<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><code>upon_error<\/code> and <code>upon_stopped<\/code> are similar to <code>then<\/code>, but where <code>then<\/code> works with values sent by the input sender, <code>upon_error<\/code> works with errors, and <code>upon_stopped<\/code> is invoked when the &#8220;stopped&#8221; signal is sent.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A nice example about <code>then,upon_error<\/code>, and <code>upon_stopped<\/code> has the prototype library <a href=\"https:\/\/github.com\/NVIDIA\/stdexec\">stdexec<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following example shows an HTTP request handler.(<a href=\"https:\/\/github.com\/NVIDIA\/stdexec\/blob\/main\/examples\/server_theme\/then_upon.cpp#L151\">https:\/\/github.com\/NVIDIA\/stdexec\/blob\/main\/examples\/server_theme\/then_upon.cpp#L151)<\/a><\/p>\n\n\n\n<!-- HTML generated using hilite.me --><div style=\"background: #f0f3f3; overflow:auto;width:auto;gray;border-width:.1em .1em .1em .8em\"><pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #0099FF; font-style: italic\">\/*<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> * Copyright (c) 2022 Lucian Radu Teodorescu<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> *<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> * Licensed under the Apache License Version 2.0 with LLVM Exceptions<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> * (the &quot;License&quot;); you may not use this file except in compliance with<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> * the License. You may obtain a copy of the License at<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> *<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> *   https:\/\/llvm.org\/LICENSE.txt<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> *<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> * Unless required by applicable law or agreed to in writing, software<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> * See the License for the specific language governing permissions and<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> * limitations under the License.<\/span>\n<span style=\"color: #0099FF; font-style: italic\"> *\/<\/span>\n <span style=\"color: #0099FF; font-style: italic\">\/\/ Handler for the &quot;classify&quot; request type<\/span>\n\nex<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> handle_classify_request(<span style=\"color: #006699; font-weight: bold\">const<\/span> http_request<span style=\"color: #555555\">&amp;<\/span> req) {\n  <span style=\"color: #006699; font-weight: bold\">return<\/span>\n    <span style=\"color: #0099FF; font-style: italic\">\/\/ start with the input buffer<\/span>\n    ex<span style=\"color: #555555\">::<\/span>just(req)\n    <span style=\"color: #0099FF; font-style: italic\">\/\/ extract the image from the input request<\/span>\n    <span style=\"color: #555555\">|<\/span> ex<span style=\"color: #555555\">::<\/span>then(extract_image)\n    <span style=\"color: #0099FF; font-style: italic\">\/\/ analyze the content of the image and classify it<\/span>\n    <span style=\"color: #0099FF; font-style: italic\">\/\/ we are doing the processing on the same thread<\/span>\n    <span style=\"color: #555555\">|<\/span> ex<span style=\"color: #555555\">::<\/span>then(do_classify)\n    <span style=\"color: #0099FF; font-style: italic\">\/\/ handle errors<\/span>\n    <span style=\"color: #555555\">|<\/span> ex<span style=\"color: #555555\">::<\/span>upon_error(on_classification_error)\n    <span style=\"color: #0099FF; font-style: italic\">\/\/ handle cancellation<\/span>\n    <span style=\"color: #555555\">|<\/span> ex<span style=\"color: #555555\">::<\/span>upon_stopped(on_classification_cancelled)\n    <span style=\"color: #0099FF; font-style: italic\">\/\/ transform this into a response<\/span>\n    <span style=\"color: #555555\">|<\/span> ex<span style=\"color: #555555\">::<\/span>then(to_response)\n    <span style=\"color: #0099FF; font-style: italic\">\/\/ done<\/span>\n    ;\n}\n<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The function extracts images and returns an<code> ex::sender<\/code> object, representing an asynchronous operation that can be composed of other operations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The function takes a constant reference to an <code>http_request req<\/code>. The processing pipeline begins with the <code>ex::just(req)<\/code> function, creating a sender that starts with the HTTP request&#8217;s input buffer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Error handling is incorporated into the pipeline using the <code>ex::upon_error <\/code>function, which specifies the <code>on_classification_error<\/code> function to handle any errors that occur during the classification process. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The pipeline then uses the <code>ex::then <\/code>function to chain a series of operations. The first operation, <code>extract_image,<\/code> extracts the image from the input request. The next operation,  <code>do_classify<\/code>, classifies the extracted image&#8217;s content. This processing is done on the same thread.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Similarly, the<code> ex::upon_stopped<\/code> function is used to handle the cancellation of the operation, specifying the <code>on_classification_cancelled <\/code>function.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, the to_response function is used to transform the classification result into an HTTP response. This transformation is also done using the <code>ex::then<\/code> function.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This sender adaptor changes the execution resource on which the sender runs. It does not adapt the sender. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This code demonstrates a composable and asynchronous processing pipeline for gracefully handling HTTP requests, classifying images, and errors and cancellations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"execution_starts_on\"><\/span><code>execution::starts_on<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<!-- HTML generated using hilite.me --><div style=\"background: #f0f3f3; overflow:auto;width:auto;gray;border-width:.1em .1em .1em .8em\"><pre style=\"margin: 0; line-height: 125%\">execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> starts_on(\n    execution<span style=\"color: #555555\">::<\/span>scheduler <span style=\"color: #006699; font-weight: bold\">auto<\/span> sched,\n    execution<span style=\"color: #555555\">::<\/span>sender <span style=\"color: #006699; font-weight: bold\">auto<\/span> snd\n);\n<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Whats_Next\"><\/span>What&#8217;s Next?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>std::execution<\/code> has more sender adaptors to offer: <code>execution::let_*,<\/code> <code>execution::into_variant, execution::stopped_as_optional<\/code>,  <code>execution::stopped_as_error<\/code>, <code>execution::bulk<\/code>,  <code>execution::split<\/code>, and <code>execution::when_all<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>std::execution offers three types of senders: factories, adapters, and consumers. I&#8217;ll take a closer look at these today. Most of the following content is from proposal P2300R10. I will try to represent it more concisely. Sender Factory A sender factory is an algorithm that takes no senders as parameters and returns a sender. execution::schedule execution::sender [&hellip;]<\/p>\n","protected":false},"author":21,"featured_media":10445,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[559],"tags":[561],"class_list":["post-10444","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c26-blog","tag-execution"],"_links":{"self":[{"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/posts\/10444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/comments?post=10444"}],"version-history":[{"count":28,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/posts\/10444\/revisions"}],"predecessor-version":[{"id":10514,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/posts\/10444\/revisions\/10514"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/media\/10445"}],"wp:attachment":[{"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/media?parent=10444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/categories?post=10444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/tags?post=10444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}