<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Problem mit libsigc++]]></title><description><![CDATA[<p>Bisher hat das immer anstandslos kompiliert, nur plötzlich hab ich Fehlermeldungen aus denen ich nicht ganz schlau werde:</p>
<blockquote>
<p>1&gt;------ Erstellen gestartet: Projekt: NLSandbox, Konfiguration: Debug Win32 ------<br />
1&gt;Kompilieren...<br />
1&gt;NLApplication.cpp<br />
1&gt;D:\Source\NightLight\include\sigc++/functors/slot.h(172) : error C2059: Syntaxfehler: 'template'<br />
1&gt; D:\Source\NightLight\include\sigc++/functors/slot.h(169): Bei der Kompilierung der Klassen-template der void sigc::internal::slot_call2&lt;T_functor,T_return,T_arg1,T_arg2&gt;::call_it(sigc::internal::slot_rep *,const unsigned char &amp;,const bool &amp;)-Memberfunktion<br />
1&gt; with<br />
1&gt; [<br />
1&gt; T_functor=sigc::bound_mem_functor2&lt;void,NightLight::NLApplication,NightLight::u8,bool&gt;,<br />
1&gt; T_return=void,<br />
1&gt; T_arg1=const NightLight::u8,<br />
1&gt; T_arg2=const bool<br />
1&gt; ]<br />
1&gt; D:\Source\NightLight\include\sigc++/functors/slot.h(607): Siehe Verweis auf die Instanziierung der gerade kompilierten Klassen-template &quot;sigc::internal::slot_call2&lt;T_functor,T_return,T_arg1,T_arg2&gt;&quot;.<br />
1&gt; with<br />
1&gt; [<br />
1&gt; T_functor=sigc::bound_mem_functor2&lt;void,NightLight::NLApplication,NightLight::u8,bool&gt;,<br />
1&gt; T_return=void,<br />
1&gt; T_arg1=const NightLight::u8,<br />
1&gt; T_arg2=const bool<br />
1&gt; ]<br />
1&gt; D:\Source\NightLight\include\sigc++/functors/slot.h(1183): Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-template &quot;sigc::slot2&lt;T_return,T_arg1,T_arg2&gt;::slot2&lt;T_functor&gt;(const T_functor &amp;)&quot;.<br />
1&gt; with<br />
1&gt; [<br />
1&gt; T_return=void,<br />
1&gt; T_arg1=const NightLight::u8,<br />
1&gt; T_arg2=const bool,<br />
1&gt; T_functor=sigc::bound_mem_functor2&lt;void,NightLight::NLApplication,NightLight::u8,bool&gt;<br />
1&gt; ]<br />
1&gt; .\NLApplication.cpp(55): Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-template &quot;sigc::slot&lt;T_return,T_arg1,T_arg2&gt;::slot&lt;sigc::bound_mem_functor2&lt;T_return,T_obj,NightLight::u8,bool&gt;&gt;(const T_functor &amp;)&quot;.<br />
1&gt; with<br />
1&gt; [<br />
1&gt; T_return=void,<br />
1&gt; T_arg1=const NightLight::u8,<br />
1&gt; T_arg2=const bool,<br />
1&gt; T_obj=NightLight::NLApplication,<br />
1&gt; T_functor=sigc::bound_mem_functor2&lt;void,NightLight::NLApplication,NightLight::u8,bool&gt;<br />
1&gt; ]<br />
1&gt;D:\Source\NightLight\include\sigc++/functors/slot.h(172) : error C2951: template-Deklarationen sind nur im globalen, Namespace- oder Klassengültigkeitsbereich zulässig.<br />
1&gt;Das Buildprotokoll wurde unter &quot;file://D:\Source\NightLight\obj\NLSandbox\Debug\BuildLog.htm&quot; gespeichert.<br />
1&gt;NLSandbox - 2 Fehler, 0 Warnung(en)<br />
========== Erstellen: 0 erfolgreich, Fehler bei 1, 1 aktuell, 0 übersprungen ==========</p>
</blockquote>
<p>Folgende Typedefs und Macros:</p>
<pre><code class="language-cpp">/// \brief Key-Event-Slot
    typedef sigc::slot&lt;void, const u8, const bool&gt; NLKeySlot;

    /// \brief Key-Event
    // true if down
    typedef sigc::signal&lt;void, const u8, const bool&gt; NLKeyEvent;

    /// \brief Mouse-Event-Slot
    typedef sigc::slot&lt;void, const f32, const f32, const u8, const bool&gt; NLMouseSlot;

    /// \brief Mouse-Event
    // true if down
    typedef sigc::signal&lt;void, const f32, const f32, const u8, const bool&gt; NLMouseEvent;

    /// \brief Render Event-Slot
    typedef sigc::slot&lt;void, const u32&gt; NLRenderSlot;

    /// \brief Render Event
    typedef sigc::signal&lt;void, const u32&gt; NLRenderEvent;

    /// \brief Quit-Event. Is fired when the application quits.
    typedef sigc::signal&lt;bool&gt; NLQuitEvent;

    /// \brief Quit-Slot.
    typedef sigc::slot&lt;bool&gt; NLQuitSlot;

/*!
 * \def NLBindKeySlot(CNAME, FNAME)
 * \brief Use this macro to bind your method as callback for the KeyEvent.
 * \param CNAME The name of the class holding the callback.
 * \param FNAME The Name of the function which represents the callback.
 */
#define NLBindKeySlot(CNAME, FNAME) \
    NLIWindow::NLKeySlot(sigc::mem_fun(this, &amp;CNAME::FNAME))

/**
 * \brief Use this macro to bind your method as callback for the MouseMove-Event.
 * \param CNAME The name of the class holding the callback.
 * \param FNAME The Name of the function which represents the callback.
 */
#define NLBindMouseSlot(CNAME, FNAME) \
   NLIWindow::NLMouseSlot(sigc::mem_fun(this, &amp;CNAME::FNAME))

/**
 * \brief Use this macro to bind your method as callback for the Render-Event.
 * \param CNAME The name of the class holding the callback.
 * \param FNAME The Name of the function which represents the callback.
 */
#define NLBindRenderSlot(CNAME, FNAME) \
    NLIWindow::NLRenderSlot(sigc::mem_fun(this, &amp;CNAME::FNAME))
</code></pre>
<p>Verwendung:</p>
<pre><code class="language-cpp">window.connectSignal(NLBindKeySlot(NLApplication, onKey));
    window.connectSignal(NLBindRenderSlot(NLApplication, onRender));
    window.connectSignal(NLBindQuitSlot(NLApplication, onQuit));
    window.connectSignal(NLBindMouseSlot(NLApplication, onMouseMove));
</code></pre>
<p>Fehlerstelle im libsigc++ Code:</p>
<pre><code class="language-cpp">static T_return call_it(slot_rep* rep, typename type_trait&lt;T_arg1&gt;::take a_1,typename type_trait&lt;T_arg2&gt;::take a_2)
    {
      typedef typed_slot_rep&lt;T_functor&gt; typed_slot;
      typed_slot *typed_rep = static_cast&lt;typed_slot*&gt;(rep);
      return (typed_rep-&gt;functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES&lt;typename type_trait&lt;T_arg1&gt;::take,typename type_trait&lt;T_arg2&gt;::take&gt;
               (a_1,a_2);
    }
</code></pre>
<p>Hoffe jemand kann mir helfen.<br />
rya.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/252584/problem-mit-libsigc</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 08:29:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/252584.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 Oct 2009 20:28:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit libsigc++ on Wed, 21 Oct 2009 20:28:57 GMT]]></title><description><![CDATA[<p>Bisher hat das immer anstandslos kompiliert, nur plötzlich hab ich Fehlermeldungen aus denen ich nicht ganz schlau werde:</p>
<blockquote>
<p>1&gt;------ Erstellen gestartet: Projekt: NLSandbox, Konfiguration: Debug Win32 ------<br />
1&gt;Kompilieren...<br />
1&gt;NLApplication.cpp<br />
1&gt;D:\Source\NightLight\include\sigc++/functors/slot.h(172) : error C2059: Syntaxfehler: 'template'<br />
1&gt; D:\Source\NightLight\include\sigc++/functors/slot.h(169): Bei der Kompilierung der Klassen-template der void sigc::internal::slot_call2&lt;T_functor,T_return,T_arg1,T_arg2&gt;::call_it(sigc::internal::slot_rep *,const unsigned char &amp;,const bool &amp;)-Memberfunktion<br />
1&gt; with<br />
1&gt; [<br />
1&gt; T_functor=sigc::bound_mem_functor2&lt;void,NightLight::NLApplication,NightLight::u8,bool&gt;,<br />
1&gt; T_return=void,<br />
1&gt; T_arg1=const NightLight::u8,<br />
1&gt; T_arg2=const bool<br />
1&gt; ]<br />
1&gt; D:\Source\NightLight\include\sigc++/functors/slot.h(607): Siehe Verweis auf die Instanziierung der gerade kompilierten Klassen-template &quot;sigc::internal::slot_call2&lt;T_functor,T_return,T_arg1,T_arg2&gt;&quot;.<br />
1&gt; with<br />
1&gt; [<br />
1&gt; T_functor=sigc::bound_mem_functor2&lt;void,NightLight::NLApplication,NightLight::u8,bool&gt;,<br />
1&gt; T_return=void,<br />
1&gt; T_arg1=const NightLight::u8,<br />
1&gt; T_arg2=const bool<br />
1&gt; ]<br />
1&gt; D:\Source\NightLight\include\sigc++/functors/slot.h(1183): Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-template &quot;sigc::slot2&lt;T_return,T_arg1,T_arg2&gt;::slot2&lt;T_functor&gt;(const T_functor &amp;)&quot;.<br />
1&gt; with<br />
1&gt; [<br />
1&gt; T_return=void,<br />
1&gt; T_arg1=const NightLight::u8,<br />
1&gt; T_arg2=const bool,<br />
1&gt; T_functor=sigc::bound_mem_functor2&lt;void,NightLight::NLApplication,NightLight::u8,bool&gt;<br />
1&gt; ]<br />
1&gt; .\NLApplication.cpp(55): Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-template &quot;sigc::slot&lt;T_return,T_arg1,T_arg2&gt;::slot&lt;sigc::bound_mem_functor2&lt;T_return,T_obj,NightLight::u8,bool&gt;&gt;(const T_functor &amp;)&quot;.<br />
1&gt; with<br />
1&gt; [<br />
1&gt; T_return=void,<br />
1&gt; T_arg1=const NightLight::u8,<br />
1&gt; T_arg2=const bool,<br />
1&gt; T_obj=NightLight::NLApplication,<br />
1&gt; T_functor=sigc::bound_mem_functor2&lt;void,NightLight::NLApplication,NightLight::u8,bool&gt;<br />
1&gt; ]<br />
1&gt;D:\Source\NightLight\include\sigc++/functors/slot.h(172) : error C2951: template-Deklarationen sind nur im globalen, Namespace- oder Klassengültigkeitsbereich zulässig.<br />
1&gt;Das Buildprotokoll wurde unter &quot;file://D:\Source\NightLight\obj\NLSandbox\Debug\BuildLog.htm&quot; gespeichert.<br />
1&gt;NLSandbox - 2 Fehler, 0 Warnung(en)<br />
========== Erstellen: 0 erfolgreich, Fehler bei 1, 1 aktuell, 0 übersprungen ==========</p>
</blockquote>
<p>Folgende Typedefs und Macros:</p>
<pre><code class="language-cpp">/// \brief Key-Event-Slot
    typedef sigc::slot&lt;void, const u8, const bool&gt; NLKeySlot;

    /// \brief Key-Event
    // true if down
    typedef sigc::signal&lt;void, const u8, const bool&gt; NLKeyEvent;

    /// \brief Mouse-Event-Slot
    typedef sigc::slot&lt;void, const f32, const f32, const u8, const bool&gt; NLMouseSlot;

    /// \brief Mouse-Event
    // true if down
    typedef sigc::signal&lt;void, const f32, const f32, const u8, const bool&gt; NLMouseEvent;

    /// \brief Render Event-Slot
    typedef sigc::slot&lt;void, const u32&gt; NLRenderSlot;

    /// \brief Render Event
    typedef sigc::signal&lt;void, const u32&gt; NLRenderEvent;

    /// \brief Quit-Event. Is fired when the application quits.
    typedef sigc::signal&lt;bool&gt; NLQuitEvent;

    /// \brief Quit-Slot.
    typedef sigc::slot&lt;bool&gt; NLQuitSlot;

/*!
 * \def NLBindKeySlot(CNAME, FNAME)
 * \brief Use this macro to bind your method as callback for the KeyEvent.
 * \param CNAME The name of the class holding the callback.
 * \param FNAME The Name of the function which represents the callback.
 */
#define NLBindKeySlot(CNAME, FNAME) \
    NLIWindow::NLKeySlot(sigc::mem_fun(this, &amp;CNAME::FNAME))

/**
 * \brief Use this macro to bind your method as callback for the MouseMove-Event.
 * \param CNAME The name of the class holding the callback.
 * \param FNAME The Name of the function which represents the callback.
 */
#define NLBindMouseSlot(CNAME, FNAME) \
   NLIWindow::NLMouseSlot(sigc::mem_fun(this, &amp;CNAME::FNAME))

/**
 * \brief Use this macro to bind your method as callback for the Render-Event.
 * \param CNAME The name of the class holding the callback.
 * \param FNAME The Name of the function which represents the callback.
 */
#define NLBindRenderSlot(CNAME, FNAME) \
    NLIWindow::NLRenderSlot(sigc::mem_fun(this, &amp;CNAME::FNAME))
</code></pre>
<p>Verwendung:</p>
<pre><code class="language-cpp">window.connectSignal(NLBindKeySlot(NLApplication, onKey));
    window.connectSignal(NLBindRenderSlot(NLApplication, onRender));
    window.connectSignal(NLBindQuitSlot(NLApplication, onQuit));
    window.connectSignal(NLBindMouseSlot(NLApplication, onMouseMove));
</code></pre>
<p>Fehlerstelle im libsigc++ Code:</p>
<pre><code class="language-cpp">static T_return call_it(slot_rep* rep, typename type_trait&lt;T_arg1&gt;::take a_1,typename type_trait&lt;T_arg2&gt;::take a_2)
    {
      typedef typed_slot_rep&lt;T_functor&gt; typed_slot;
      typed_slot *typed_rep = static_cast&lt;typed_slot*&gt;(rep);
      return (typed_rep-&gt;functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES&lt;typename type_trait&lt;T_arg1&gt;::take,typename type_trait&lt;T_arg2&gt;::take&gt;
               (a_1,a_2);
    }
</code></pre>
<p>Hoffe jemand kann mir helfen.<br />
rya.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1796015</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1796015</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Wed, 21 Oct 2009 20:28:57 GMT</pubDate></item></channel></rss>