File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -406,10 +406,8 @@ myaliendetector.signal_detected.connect( sigc::hide<std::string>( sigc::pt
406
406
<para >A similar topic is retyping. Perhaps you have a signal that takes an <literal remap =" tt" >int</literal >, but
407
407
you want to connect a function that takes a <literal remap =" tt" >double</literal >.</para >
408
408
409
- <para >This can be achieved with the <literal remap =" tt" >sigc::retype</literal > template. <literal remap =" tt" >retype</literal > has template arguments
410
- just like <literal remap =" tt" >sigc::signal</literal > - return value, signal types.</para >
411
-
412
- <para >It's a function template that takes a <literal remap =" tt" >sigc::slot</literal >, and returns a <literal remap =" tt" >sigc::slot</literal >. eg.</para >
409
+ <para >This can be achieved with the <literal remap =" tt" >sigc::retype()</literal > template.
410
+ It takes a <literal remap =" tt" >sigc::slot</literal >, and returns a <literal remap =" tt" >sigc::slot</literal >. eg.</para >
413
411
414
412
<programlisting >
415
413
void dostuff(double foo)
@@ -418,11 +416,11 @@ void dostuff(double foo)
418
416
419
417
sigc::signal< void(int)> asignal;
420
418
421
- asignal.connect( sigc::retype< void(int) > ( sigc::ptr_fun(& dostuff) ) );
419
+ asignal.connect( sigc::retype( sigc::ptr_fun(& dostuff) ) );
422
420
</programlisting >
423
421
424
- <para >If you only want to change the return type, you can use <literal remap =" tt" >sigc::retype_return</literal >.
425
- <literal remap =" tt" >retype_return</literal > needs only one template argument.</para >
422
+ <para >If you only want to change the return type, you can use <literal remap =" tt" >sigc::retype_return() </literal >.
423
+ <literal remap =" tt" >retype_return() </literal > needs one template argument, the new return type .</para >
426
424
</sect1 >
427
425
</chapter >
428
426
You can’t perform that action at this time.
0 commit comments