Skip to content

Commit 0aa9ed9

Browse files
committed
docs/docs/manual/libsigc_manual.xml: Fix description of sigc::retype()
Although sigc::retype() is a template function, no template parameters shall be specified when it's called.
1 parent c0d4c0a commit 0aa9ed9

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

docs/docs/manual/libsigc_manual.xml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,8 @@ myaliendetector.signal_detected.connect( sigc::hide<std::string>( sigc::pt
406406
<para>A similar topic is retyping. Perhaps you have a signal that takes an <literal remap="tt">int</literal>, but
407407
you want to connect a function that takes a <literal remap="tt">double</literal>.</para>
408408

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>
413411

414412
<programlisting>
415413
void dostuff(double foo)
@@ -418,11 +416,11 @@ void dostuff(double foo)
418416

419417
sigc::signal&lt;void(int)&gt; asignal;
420418

421-
asignal.connect( sigc::retype&lt;void(int)&gt;( sigc::ptr_fun(&amp;dostuff) ) );
419+
asignal.connect( sigc::retype( sigc::ptr_fun(&amp;dostuff) ) );
422420
</programlisting>
423421

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>
426424
</sect1>
427425
</chapter>
428426

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy