Note that there are some explanatory texts on larger screens.

plurals
  1. POError yaml-cpp compile in RAD Studio 2010
    text
    copied!<p>I can't compile <code>yaml-cpp</code> in RAD Studio 2010. I have error in <code>nodeutil.h</code></p> <pre><code>template &lt;typename T, typename U&gt; struct is_same_type { enum { value = false }; }; template &lt;typename T&gt; struct is_same_type&lt;T, T&gt; { enum { value = true }; }; template &lt;typename T, bool check&gt; struct is_index_type_with_check { enum { value = false }; }; template &lt;&gt; struct is_index_type_with_check&lt;std::size_t, false&gt; { enum { value = true }; }; // line 24 #define MAKE_INDEX_TYPE(Type) \ template &lt;&gt; struct is_index_type_with_check&lt;Type, is_same_type&lt;Type, std::size_t&gt;::value&gt; { enum { value = true }; } MAKE_INDEX_TYPE(int); MAKE_INDEX_TYPE(unsigned); // line 30 MAKE_INDEX_TYPE(short); MAKE_INDEX_TYPE(unsigned short); MAKE_INDEX_TYPE(long); MAKE_INDEX_TYPE(unsigned long); #undef MAKE_INDEX_TYPE </code></pre> <p>Compiler print:</p> <p><code>[BCC32 Error] nodeutil.h(30): E2238 Multiple declaration for 'is_index_type_with_check&lt;unsigned int,0&gt;'</code></p> <p><code>[BCC32 Error] nodeutil.h(24): E2344 Earlier declaration of 'is_index_type_with_check&lt;unsigned int,0&gt;'</code></p> <p>I think that all correct - in line 24 I got </p> <p><code>is_index_type_with_check&lt;std::size_t, false&gt;</code>, </p> <p>in line 30 I got </p> <p><code>is_index_type_with_check&lt;unsigned, true&gt;</code>. </p> <p>Two different type.</p> <p>But if I change line 24 like below, RAD Studio can compile <code>yaml-cpp</code></p> <pre><code>template &lt;&gt; struct is_index_type_with_check&lt;std::size_t, true&gt; { enum { value = true }; }; // false -&gt; true </code></pre> <p>Why?! In line 24 I got </p> <p><code>is_index_type_with_check&lt;std::size_t, true&gt;</code> </p> <p>and in line 30 </p> <p><code>is_index_type_with_check&lt;unsigned, true&gt;</code></p> <p>Two identically type. But all work in RAD Studio and doesn't in MS VS 2008 Express.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload