1+ <!doctype html>
2+ < html class ="cpprefjp " lang ="ja " itemscope ="" itemtype ="http://schema.org/WebPage ">
3+ < head >
4+
5+
6+ <!-- Google tag (gtag.js) -->
7+ < script async src ="https://www.googletagmanager.com/gtag/js?id=G-NXNBNVBTJS "> </ script >
8+ < script >
9+ window . dataLayer = window . dataLayer || [ ] ;
10+ function gtag ( ) { dataLayer . push ( arguments ) ; }
11+ gtag ( 'js' , new Date ( ) ) ;
12+
13+ gtag ( 'config' , 'G-NXNBNVBTJS' ) ;
14+ </ script >
15+
16+
17+ < meta charset ="UTF-8 ">
18+
19+ < title > task::promise_type::await_transform - cpprefjp C++日本語リファレンス</ title >
20+
21+ < meta name ="viewport " content ="width=device-width,initial-scale=1 ">
22+ < meta name ="keywords " content ="
23+ C++,標準ライブラリ,リファレンス,ドキュメント,STL,std,execution,std::execution,task::promise_type,function template,cpp26
24+ ">
25+ < meta name ="title " content ="task::promise_type::await_transform - cpprefjp C++日本語リファレンス " />
26+ < meta itemprop ="name " content ="task::promise_type::await_transform - cpprefjp C++日本語リファレンス " />
27+ < meta property ="og:title " content ="task::promise_type::await_transform - cpprefjp C++日本語リファレンス " />
28+ < meta property ="og:url " content ="https://cpprefjp.github.io/reference/execution/execution/task/promise_type/await_transform.html " />
29+ < meta property ="og:site_name " content ="cpprefjp - C++日本語リファレンス " />
30+ < meta property ="og:type " content ="article " />
31+ < meta property ="og:description " content ="タスクコルーチンにおける[co_await式](/lang/cpp20/coroutines.md)の動作を制御する。 " />
32+ < meta name ="twitter:card " content ="summary " />
33+ < meta name ="twitter:title " content ="task::promise_type::await_transform - cpprefjp C++日本語リファレンス " />
34+ < meta name ="twitter:url " content ="https://cpprefjp.github.io/reference/execution/execution/task/promise_type/await_transform.html " />
35+ < meta name ="twitter:description " content ="タスクコルーチンにおける[co_await式](/lang/cpp20/coroutines.md)の動作を制御する。 " />
36+
37+
38+ < link rel ="alternate " type ="application/atom+xml " title ="Atom " href ="https://cpprefjp.github.io/rss.xml " />
39+
40+
41+ < link rel ="apple-touch-icon " sizes ="180x180 " href ="../../../../../static/favicons/apple-touch-icon.png?cachebust=1badf8656537fb83110091804da2a289044600de ">
42+ < link rel ="icon " type ="image/png " sizes ="32x32 " href ="../../../../../static/favicons/favicon-32x32.png?cachebust=1badf8656537fb83110091804da2a289044600de ">
43+ < link rel ="icon " type ="image/png " sizes ="16x16 " href ="../../../../../static/favicons/favicon-16x16.png?cachebust=1badf8656537fb83110091804da2a289044600de ">
44+ < link rel ="manifest " href ="../../../../../manifest.json?cachebust=1badf8656537fb83110091804da2a289044600de ">
45+ < meta name ="theme-color " content ="#f5f8fc ">
46+
47+ < link rel ="stylesheet " href ="../../../../../static/pygments/default.css?cachebust=1badf8656537fb83110091804da2a289044600de ">
48+ <!-- <link rel="stylesheet" href="../../../../../static/css/root.css"> -->
49+
50+
51+
52+
53+
54+ < link href ="../../../../../static/kunai/css/kunai-stage-0.css?cachebust=1badf8656537fb83110091804da2a289044600de " rel ="stylesheet ">
55+ < link href ="../../../../../static/kunai/css/kunai-stage-1.css?cachebust=1badf8656537fb83110091804da2a289044600de " rel ="stylesheet ">
56+ < link href ="../../../../../static/kunai/css/kunai-stage-2.css?cachebust=1badf8656537fb83110091804da2a289044600de " rel ="stylesheet ">
57+ < link href ="../../../../../static/kunai/css/kunai-stage-3.css?cachebust=1badf8656537fb83110091804da2a289044600de " rel ="stylesheet ">
58+
59+ < script type ="text/javascript " src ="../../../../../static/kunai/js/kunai-vendor.js?cachebust=1badf8656537fb83110091804da2a289044600de "> </ script >
60+ < script type ="text/javascript " src ="../../../../../static/kunai/js/kunai.js?cachebust=1badf8656537fb83110091804da2a289044600de "> </ script >
61+
62+ < script type ="text/javascript ">
63+ document . addEventListener ( 'DOMContentLoaded' , function ( ) {
64+ var kn = new Kunai ;
65+ kn . cpprefjp ( ) ;
66+ } ) ;
67+ </ script >
68+
69+ </ head >
70+ < body >
71+ < header data-kunai-mdinfo ="{"meta": {"header": ["execution"], "namespace": ["std::execution"], "class": ["task::promise_type"], "id-type": ["function template"], "cpp": ["cpp26"]}, "sources": [], "page_id": ["reference", "execution", "execution", "task", "promise_type", "await_transform"]} ">
72+ < nav class ="navbar navbar-default " role ="navigation ">
73+ < div class ="container-fluid ">
74+ < div class ="navbar-header ">
75+ < button type ="button " class ="navbar-toggle collapsed " data-toggle ="collapse " data-target ="#navbar-collapse ">
76+ < span class ="sr-only "> Toggle navigation</ span >
77+ < span class ="icon-bar "> </ span >
78+ < span class ="icon-bar "> </ span >
79+ < span class ="icon-bar "> </ span >
80+ </ button >
81+ < a class ="navbar-brand " href ="../../../../../index.html ">
82+ < div class ="title-wrapper clearfix ">
83+ < div class ="title "> cpprefjp - C++日本語リファレンス</ div >
84+ </ div >
85+ </ a >
86+ </ div >
87+
88+ < div class ="collapse navbar-collapse " id ="navbar-collapse ">
89+ < ul class ="nav navbar-nav navbar-right ">
90+ < li >
91+ < div class ="google-search ">
92+
93+
94+ < script >
95+ ( function ( ) {
96+ var cx = '013316413321391058734:ji_u66hl7hq' ;
97+ var gcse = document . createElement ( 'script' ) ;
98+ gcse . type = 'text/javascript' ;
99+ gcse . async = true ;
100+ gcse . src = ( document . location . protocol == 'https:' ? 'https:' : 'http:' ) +
101+ '//www.google.com/cse/cse.js?cx=' + cx ;
102+ var s = document . getElementsByTagName ( 'script' ) [ 0 ] ;
103+ s . parentNode . insertBefore ( gcse , s ) ;
104+ } ) ( ) ;
105+ </ script >
106+ < div class ="gcse-search "> </ div >
107+
108+
109+ </ div >
110+ </ li >
111+ < li >
112+ < a href ="https://github.com/cpprefjp/site "> GitHub Project</ a >
113+ </ li >
114+ </ ul >
115+ </ div >
116+ </ div >
117+ </ nav >
118+ </ header >
119+
120+ < main id ="main " role ="main ">
121+ < div class ="container-fluid ">
122+ < div class ="row ">
123+ < div class ="col-sm-9 col-sm-push-3 " itemscope itemtype ="http://schema.org/Article ">
124+ < div class ="row ">
125+ < div class ="col-sm-12 google-search-result ">
126+ < gcse:searchresults > </ gcse:searchresults >
127+ </ div >
128+ </ div >
129+ < div class ="row ">
130+ < div class ="col-sm-12 content-header ">
131+
132+ < ol class ="breadcrumb ">
133+
134+ < li itemscope itemtype ="http://www.schema.org/SiteNavigationElement ">
135+ < span >
136+
137+ < a href ="../../../../../index.html " itemprop ="url ">
138+
139+ < i class ="fa fa-fw fa-home "> </ i >
140+
141+ </ a >
142+
143+ </ span >
144+ </ li >
145+
146+ < li itemscope itemtype ="http://www.schema.org/SiteNavigationElement ">
147+ < span >
148+
149+ < a href ="../../../../../reference.html " itemprop ="url ">
150+
151+ < span itemprop ="name "> リファレンス</ span >
152+
153+ </ a >
154+
155+ </ span >
156+ </ li >
157+
158+ < li itemscope itemtype ="http://www.schema.org/SiteNavigationElement ">
159+ < span >
160+
161+ < a href ="../../../../../reference/execution.html " itemprop ="url ">
162+
163+ < span itemprop ="name "> execution</ span >
164+
165+ </ a >
166+
167+ </ span >
168+ </ li >
169+
170+ < li itemscope itemtype ="http://www.schema.org/SiteNavigationElement ">
171+ < span >
172+
173+ < a href ="../../../../../reference/execution/execution.html " itemprop ="url ">
174+
175+ < span itemprop ="name "> execution</ span >
176+
177+ </ a >
178+
179+ </ span >
180+ </ li >
181+
182+ < li itemscope itemtype ="http://www.schema.org/SiteNavigationElement ">
183+ < span >
184+
185+ < a href ="../../../../../reference/execution/execution/task.html " itemprop ="url ">
186+
187+ < span itemprop ="name "> task</ span >
188+
189+ </ a >
190+
191+ </ span >
192+ </ li >
193+
194+ < li itemscope itemtype ="http://www.schema.org/SiteNavigationElement ">
195+ < span >
196+
197+ < a href ="../../../../../reference/execution/execution/task/promise_type.html " itemprop ="url ">
198+
199+ < span itemprop ="name "> task::promise_type</ span >
200+
201+ </ a >
202+
203+ </ span >
204+ </ li >
205+
206+ < li class ="active " itemscope itemtype ="http://www.schema.org/SiteNavigationElement ">
207+ < span >
208+
209+
210+ < span itemprop ="name "> await_transform</ span >
211+
212+
213+ </ span >
214+ </ li >
215+
216+ </ ol >
217+ < div class ="crsearch "> </ div >
218+
219+ </ div >
220+ </ div >
221+ < div class ="row ">
222+ < div class ="col-sm-12 edit-button ">
223+
224+
225+ < p class ="text-right "> < small >
226+ 最終更新日時(UTC):
227+ < span itemprop ="datePublished " content ="2026-01-14T15:45:13 ">
228+ 2026年01月14日 15時45分13秒
229+ </ span >
230+ < br />
231+ < span itemprop ="author " itemscope itemtype ="http://schema.org/Person ">
232+ < span itemprop ="name "> yoh</ span >
233+ </ span >
234+ が更新
235+ </ small > </ p >
236+
237+
238+ < p class ="text-right ">
239+ < a class ="history " target ="_blank " href ="https://github.com/cpprefjp/site/commits/master/reference/execution/execution/task/promise_type/await_transform.md ">
240+ < span class ="fa fa-fw fa-clock-o fa-flip-horizontal "> </ span > 履歴
241+ </ a >
242+ < a class ="edit " target ="_blank " href ="https://github.com/cpprefjp/site/edit/master/reference/execution/execution/task/promise_type/await_transform.md ">
243+ < span class ="fa fa-fw fa-pencil "> </ span > 編集
244+ </ a >
245+ </ p >
246+ </ div >
247+ </ div >
248+ < div class ="row ">
249+ < div class ="col-sm-12 content-body ">
250+
251+ < div class ="identifier-type "> function template</ div > < div class ="header "> <execution></ div > < h1 itemprop ="name "> < span class ="namespace " title ="namespace std::execution "> std::execution::</ span > < span class ="class " title ="class task::promise_type "> task::promise_type::</ span > < span class ="token "> await_transform</ span > < span class ="cpp cpp26 " title ="C++26で追加 "> (C++26)</ span > </ h1 >
252+ < h1 itemprop ="name "> < span class ="namespace " title ="namespace std::execution "> std::execution::</ span > < span class ="class " title ="class task::promise_type "> task::promise_type::</ span > < span class ="token "> 概要</ span > < span class ="cpp cpp26 " title ="C++26で追加 "> (C++26)</ span > </ h1 >
253+ < div itemprop ="articleBody "> < p > < div class ="codehilite "> < pre > < span > </ span > < code > < span class ="k "> template</ span > < span class ="o "> <</ span > < span class ="n "> < a href ="../../sender.html "> sender</ a > </ span > < span class ="n "> Sender</ span > < span class ="o "> ></ span >
254+ < span class ="k "> auto</ span > < span class ="n "> await_transform</ span > < span class ="p "> (</ span > < span class ="n "> Sender</ span > < span class ="o "> &&</ span > < span class ="n "> sndr</ span > < span class ="p "> );</ span > < span class ="c1 "> // (1)</ span >
255+
256+ < span class ="k "> template</ span > < span class ="o "> <</ span > < span class ="k "> class</ span > < span class ="nc "> Sch</ span > < span class ="o "> ></ span >
257+ < span class ="k "> auto</ span > < span class ="n "> await_transform</ span > < span class ="p "> (</ span > < span class ="n "> < span href ="https://cpprefjp.github.io/reference/execution/execution/change_coroutine_scheduler.md.nolink "> change_coroutine_scheduler</ span > </ span > < span class ="o "> <</ span > < span class ="n "> Sch</ span > < span class ="o "> ></ span > < span class ="n "> sch</ span > < span class ="p "> );</ span > < span class ="c1 "> // (2)</ span >
258+ </ code > </ pre > </ div >
259+ </ p >
260+ < p > タスクコルーチンにおける< a href ="../../../../../lang/cpp20/coroutines.html "> co_await式</ a > の動作を制御する。
261+ プログラマが本関数を直接利用することは想定されていない。</ p >
262+ < h2 > 効果</ h2 >
263+ < ul >
264+ < li > (1) :< ul >
265+ < li > < code > < a href ="../../../../concepts/same_as.html "> same_as</ a > << a href ="../../inline_scheduler.html "> inline_scheduler</ a > ,< a href ="../../task.html "> scheduler_type</ a > > == true</ code > ならば、< code > < a href ="../../as_awaitable.html "> as_awaitable</ a > (std::forward<Sender>(sndr), *this)</ code > を返す。</ li >
266+ < li > そうでなければ、< code > < a href ="../../as_awaitable.html "> as_awaitable</ a > (< span href ="https://cpprefjp.github.io/reference/execution/execution/affine_on.md.nolink "> affine_on</ span > (std::forward<Sender>(sndr), SCHED(*this)), *this)</ code > を返す。</ li >
267+ </ ul >
268+ </ li >
269+ < li >
270+ < p > (2) : 以下と等価</ p >
271+ < p > < div class ="codehilite "> < pre > < span > </ span > < code > < span class ="k "> return</ span > < span class ="nf "> await_transform</ span > < span class ="p "> (</ span > < span class ="n "> < a href ="../../just.html "> just</ a > </ span > < span class ="p "> (</ span > < span class ="n "> < a href ="../../../../utility/exchange.html "> exchange</ a > </ span > < span class ="p "> (</ span > < span class ="n "> SCHED</ span > < span class ="p "> (</ span > < span class ="o "> *</ span > < span class ="k "> this</ span > < span class ="p "> ),</ span > < span class ="n "> < a href ="../../task.html "> scheduler_type</ a > </ span > < span class ="p "> (</ span > < span class ="n "> sch</ span > < span class ="p "> .</ span > < span class ="n "> < span href ="https://cpprefjp.github.io/reference/execution/execution/change_coroutine_scheduler.md.nolink "> scheduler</ span > </ span > < span class ="p "> ))),</ span > < span class ="o "> *</ span > < span class ="k "> this</ span > < span class ="p "> );</ span >
272+ </ code > </ pre > </ div >
273+ </ p >
274+ </ li >
275+ </ ul >
276+ < h2 > バージョン</ h2 >
277+ < h3 > 言語</ h3 >
278+ < ul >
279+ < li > C++26</ li >
280+ </ ul >
281+ < h3 > 処理系</ h3 >
282+ < ul >
283+ < li > < a href ="../../../../../implementation.html#clang "> Clang</ a > : ??</ li >
284+ < li > < a href ="../../../../../implementation.html#gcc "> GCC</ a > : ??</ li >
285+ < li > < a href ="../../../../../implementation.html#icc "> ICC</ a > : ??</ li >
286+ < li > < a href ="../../../../../implementation.html#visual_cpp "> Visual C++</ a > : ??</ li >
287+ </ ul >
288+ < h2 > 関連項目</ h2 >
289+ < ul >
290+ < li > < code > < a href ="../../as_awaitable.html "> execution::as_awaitable</ a > </ code > </ li >
291+ < li > < code > < span href ="https://cpprefjp.github.io/reference/execution/execution/affine_on.md.nolink "> execution::affine_on</ span > </ code > </ li >
292+ < li > < code > < a href ="../../inline_scheduler.html "> execution::inline_scheduler</ a > </ code > </ li >
293+ < li > < code > < span href ="https://cpprefjp.github.io/reference/execution/execution/change_coroutine_scheduler.md.nolink "> execution::change_coroutine_scheduler</ span > </ code > </ li >
294+ </ ul >
295+ < h2 > 参照</ h2 >
296+ < ul >
297+ < li > < a href ="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3552r3.html " target ="_blank "> P3552R3 Add a Coroutine Task Type</ a > </ li >
298+ </ ul > </ div >
299+
300+ </ div >
301+ </ div >
302+ </ div >
303+
304+
305+ < div id ="sidebar " class ="col-sm-3 col-sm-pull-9 ">
306+ </ div >
307+
308+
309+ </ div >
310+ </ div >
311+ </ main >
312+ < footer class ="footer navbar navbar-default ">
313+ < div class ="container-fluid ">
314+ < p > < small >
315+ 本サイトの情報は、
316+ < a href ="https://creativecommons.org/licenses/by/3.0/deed.ja " rel ="nofollow "> クリエイティブ・コモンズ 表示 3.0 非移植 ライセンス(CC BY)</ a >
317+ の下に提供されています。
318+ </ small > </ p >
319+ </ div >
320+ </ footer >
321+ </ body >
322+ </ html >
0 commit comments