<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Support forum</title><link href="https://sourceforge.net/p/stlplus/discussion/" rel="alternate"/><link href="https://sourceforge.net/p/stlplus/discussion/feed.atom" rel="self"/><id>https://sourceforge.net/p/stlplus/discussion/</id><updated>2020-10-29T10:37:27.214000Z</updated><subtitle>Recent posts to Support forum</subtitle><entry><title>ntree issue with const_iterator?</title><link href="https://sourceforge.net/p/stlplus/discussion/345536/thread/2eb31a4518/?limit=25#e366" rel="alternate"/><published>2020-10-29T10:37:27.214000Z</published><updated>2020-10-29T10:37:27.214000Z</updated><author><name>Andy Rushton</name><uri>https://sourceforge.net/u/andy_rushton/</uri></author><id>https://sourceforge.net94cb7849fd58a05257d0f6cd856fffdd664bcc95</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Oh, interesting, thanks for investigating this further, I've just learned something. It shows I'm a bit out of date (probably quite a lot) as I don't use C++ much anymore. At the time STLplus was developed you could not convert between iterator types, so this feature has been added more recently, though I've done a quick search but I haven't been able to find out when.  It is now true that an iterator implicitly converts to a const_iterator in the STL, but STLplus does not do this.&lt;br/&gt;
I approve in that the non-convertability of const_iterator/iterator made coding with STL a real pain sometimes for the reasons you mention, which gets worse when creating complex data structures. We often had to cast a const object onto a non-const reference or vice-versa, to match up with an iterator type, since the iterator itself could not be type-converted, a horrible bodge!&lt;br/&gt;
However, I was aware of this problem at the time of writing STLplus, having grappled with const problems in C++/STL for years, and came up with a different solution - all of the STLplus iterator types have methods called constify and deconstify that allow the explicit conversion in either direction. I can see these aren't in the documentation (oops) but are visible in the headers.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;ntree&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;bar&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;ntree&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;const_iterator&lt;/span&gt; &lt;span class="n"&gt;iter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="n"&gt;constify&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;   &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="n"&gt;Ok&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;also&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;ntree&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;iterator&lt;/span&gt; &lt;span class="n"&gt;iter1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;ntree&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;const_iterator&lt;/span&gt; &lt;span class="n"&gt;iter2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;iter1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;constify&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I'm not keen on adding an implicit type conversion as my reading around the subject and my past experience suggests that retro-fitting an implicit type conversion will be fraught with side-effects. I'm inclined to stick with my existing solution.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>ntree issue with const_iterator?</title><link href="https://sourceforge.net/p/stlplus/discussion/345536/thread/2eb31a4518/?limit=25#9958" rel="alternate"/><published>2020-10-28T19:40:42.451000Z</published><updated>2020-10-28T19:40:42.451000Z</updated><author><name>EML</name><uri>https://sourceforge.net/u/eml/</uri></author><id>https://sourceforge.net4a7d41e199e973f1ae2efd09aaa54e7b75fdc589</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Andy - I'm no expert on the STL, but this code does produce the expected (to me, anyway) output of 42, 43, 42:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;#&lt;span class="k"&gt;include&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt;vector&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
#&lt;span class="k"&gt;include&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt;iostream&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="nv"&gt;int&lt;/span&gt; &lt;span class="nv"&gt;main&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt; {
   &lt;span class="nv"&gt;std&lt;/span&gt;::&lt;span class="nv"&gt;vector&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt;int&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;foo&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
   &lt;span class="nv"&gt;std&lt;/span&gt;::&lt;span class="nv"&gt;vector&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt;int&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;::&lt;span class="nv"&gt;const_iterator&lt;/span&gt; &lt;span class="nv"&gt;iter1&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;

   &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nv"&gt;a&lt;/span&gt; &lt;span class="nv"&gt;const_iterator&lt;/span&gt; &lt;span class="nv"&gt;can&lt;/span&gt; &lt;span class="nv"&gt;be&lt;/span&gt; &lt;span class="nv"&gt;used&lt;/span&gt; &lt;span class="nv"&gt;to&lt;/span&gt; &lt;span class="nv"&gt;traverse&lt;/span&gt; &lt;span class="nv"&gt;a&lt;/span&gt; &lt;span class="nv"&gt;non&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;const&lt;/span&gt; &lt;span class="nv"&gt;object&lt;/span&gt;:
   &lt;span class="nv"&gt;foo&lt;/span&gt;.&lt;span class="nv"&gt;push_back&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
   &lt;span class="nv"&gt;foo&lt;/span&gt;.&lt;span class="nv"&gt;push_back&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;43&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
   &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;iter1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;foo&lt;/span&gt;.&lt;span class="nv"&gt;begin&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;; iter1 != foo.end(); ++iter1)&lt;/span&gt;
      &lt;span class="nv"&gt;std&lt;/span&gt;::&lt;span class="nv"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nv"&gt;iter1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;

   &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nv"&gt;can&lt;/span&gt; &lt;span class="nv"&gt;assign&lt;/span&gt; &lt;span class="nv"&gt;an&lt;/span&gt; &lt;span class="nv"&gt;iterator&lt;/span&gt; &lt;span class="nv"&gt;to&lt;/span&gt; &lt;span class="nv"&gt;a&lt;/span&gt; &lt;span class="nv"&gt;const_iterator&lt;/span&gt; &lt;span class="nv"&gt;directly&lt;/span&gt;:
   &lt;span class="nv"&gt;std&lt;/span&gt;::&lt;span class="nv"&gt;vector&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt;int&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;::&lt;span class="nv"&gt;iterator&lt;/span&gt; &lt;span class="nv"&gt;iter2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;foo&lt;/span&gt;.&lt;span class="nv"&gt;begin&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
   &lt;span class="nv"&gt;iter1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;iter2&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
   &lt;span class="nv"&gt;std&lt;/span&gt;::&lt;span class="nv"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nv"&gt;iter1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
}
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If this wasn't possible, I'd have to add lots of unnecessary non-const versions of routines which don't modify an object just because they might be called for a non-const object.&lt;/p&gt;
&lt;p&gt;Thanks -&lt;/p&gt;
&lt;p&gt;Evan&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>ntree issue with const_iterator?</title><link href="https://sourceforge.net/p/stlplus/discussion/345536/thread/2eb31a4518/?limit=25#7977" rel="alternate"/><published>2020-10-28T18:20:01.956000Z</published><updated>2020-10-28T18:20:01.956000Z</updated><author><name>Andy Rushton</name><uri>https://sourceforge.net/u/andy_rushton/</uri></author><id>https://sourceforge.net4284f43f5e3128bc0d8bba186ce2f285fb5a5553</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You've misunderstood the use of iterator and const_iterator. The STLplus library copies the same conventions as the STL in its use of iterators. You use an iterator to traverse a data structure which is non-const and so modifiable, but a const_iterator when the data structure is const and so non-modifiable.&lt;br/&gt;
In this instance, you have declared an ntree&amp;lt;foo&amp;gt; which is non-const so therefore you use an iterator to traverse it.&lt;br/&gt;
The most common place where you use const_iterator is in a function that is not going to modify the data structure. In that case, the convention in C++ is to pass the data structure as a const reference (const ntree&amp;lt;foo&amp;gt;&amp;amp;) so within that function you are accessing a const data structure and therefore need to use the const_iterator.&lt;br/&gt;
You will note that the root() methods are different, the one returning an iterator is a non-const method and the version returning a const_iterator is a const method, which is how this convention is implemented. &lt;br/&gt;
As I said, this is standard C++/STL stuff, I've simply used the same conventions in the design of STLplus.&amp;lt;/foo&amp;gt;&amp;lt;/foo&amp;gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>ntree issue with const_iterator?</title><link href="https://sourceforge.net/p/stlplus/discussion/345536/thread/2eb31a4518/?limit=25#4f51" rel="alternate"/><published>2020-10-27T18:47:44.749000Z</published><updated>2020-10-27T18:47:44.749000Z</updated><author><name>EML</name><uri>https://sourceforge.net/u/eml/</uri></author><id>https://sourceforge.net593ebdcb3bb0e571ed8502c4bdf323a300b35864</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This code doesn't compile, despite 'root' being overloaded to return both an iterator and a const_iterator:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;ntree&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;bar&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;ntree&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;iterator&lt;/span&gt; &lt;span class="n"&gt;iter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;         &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;Ok&lt;/span&gt;
&lt;span class="n"&gt;ntree&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;const_iterator&lt;/span&gt; &lt;span class="n"&gt;iter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;   &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="k"&gt;not&lt;/span&gt; &lt;span class="n"&gt;Ok&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Similarly, a conversion from an iterator to a const_iterator doesn't compile:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;ntree&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;iterator&lt;/span&gt; &lt;span class="n"&gt;iter1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;ntree&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;const_iterator&lt;/span&gt; &lt;span class="n"&gt;iter2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;iter1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Any ideas? Thanks.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Linking problem on Cygwin - static builds only</title><link href="https://sourceforge.net/p/stlplus/discussion/345536/thread/48c7fc9c17/?limit=25#85f6" rel="alternate"/><published>2020-09-19T10:10:14.279000Z</published><updated>2020-09-19T10:10:14.279000Z</updated><author><name>Andy Rushton</name><uri>https://sourceforge.net/u/andy_rushton/</uri></author><id>https://sourceforge.net9cf054ddbb6c64dfa22959435ca99f93e3b1f0fb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have discovered a problem with the Cygwin build of gcc which means that static builds don't link. This is not a problem with STLplus, it is a problem with the implementation of the STL library supplied with gcc. The symptom is a linker error, multiple definitions of a standard exception:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;src&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;debug&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;gcc&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;.&lt;span class="mi"&gt;2&lt;/span&gt;.&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;libstdc&lt;/span&gt;&lt;span class="o"&gt;++-&lt;/span&gt;&lt;span class="nv"&gt;v3&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;src&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;c&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;cow&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;stdexcept&lt;/span&gt;.&lt;span class="nv"&gt;cc&lt;/span&gt;:&lt;span class="mi"&gt;63&lt;/span&gt;: &lt;span class="nv"&gt;multiple&lt;/span&gt; &lt;span class="nv"&gt;definition&lt;/span&gt; &lt;span class="nv"&gt;of&lt;/span&gt; `&lt;span class="nv"&gt;std&lt;/span&gt;::&lt;span class="nv"&gt;logic_error&lt;/span&gt;::&lt;span class="nv"&gt;logic_error&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;std&lt;/span&gt;::&lt;span class="nv"&gt;logic_error&lt;/span&gt; &lt;span class="nv"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;; ../../portability/CYGWIN-x86_64-debug/libportability.a(inf.o):/usr/lib/gcc/x86_64-pc-cygwin/10/include/c++/stdexcept:134: first defined here&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The solution is to add an extra linker option to allow multiple definitions to be merged:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;Wl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="c1"&gt;--allow-multiple-definition&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If you are using the makefiles system then you can add this to the Makefile or to the command line:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;make&lt;/span&gt; &lt;span class="k"&gt;STATIC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;LDFLAGS&lt;/span&gt;&lt;span class="o"&gt;=-&lt;/span&gt;&lt;span class="n"&gt;Wl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="c1"&gt;--allow-multiple-definition&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Bear in mind this is a work-round, it is not good practice to allow multiple definitions in linking, but there is nothing I or you can do about a bug in a compiler's supplied libraries!&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://stackoverflow.com/questions/46854365/multiple-definition-error-in-static-compilation-with-g-under-cygwin" rel="nofollow"&gt;Here's a Stack Overflow article about this&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://gcc.gnu.org/gcc-10/porting_to.html" rel="nofollow"&gt;Here's an explanation of why this has emerged now, with an alternative fix&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>move semantics with digraph</title><link href="https://sourceforge.net/p/stlplus/discussion/345536/thread/3e99bf50fb/?limit=25#a7f5" rel="alternate"/><published>2020-09-19T10:02:32.541000Z</published><updated>2020-09-19T10:02:32.541000Z</updated><author><name>Andy Rushton</name><uri>https://sourceforge.net/u/andy_rushton/</uri></author><id>https://sourceforge.netd65d7c41292d03744986c874b3a6f2f87af5a636</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Sorry for the delay, I didn't get a notification of this post (weird).&lt;br/&gt;
I have no intention of supporting unique_ptr in any of the STLplus data structures.&lt;br/&gt;
Using a unique_ptr in any data structure (not just STLplus but also STL) does not make sense because any read operation accessing the data will cause an assignment of the pointer type, leaving the pointer in the data structure null. It seems to me that any work round for this 'problem' is an admission that you have used the wrong pointer type.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>move semantics with digraph</title><link href="https://sourceforge.net/p/stlplus/discussion/345536/thread/3e99bf50fb/?limit=25#c25b" rel="alternate"/><published>2020-04-24T05:50:36.992000Z</published><updated>2020-04-24T05:50:36.992000Z</updated><author><name>John Lagerquist</name><uri>https://sourceforge.net/u/rallytronics/</uri></author><id>https://sourceforge.netb5655a87e3fcd924a358c43545e445476f49e7a4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Are there any thoughts on adding support to allow using std::unique_ptr for node and edge data?&lt;/p&gt;
&lt;p&gt;ie digraph&amp;lt;std::unique_ptr&amp;lt;foo&amp;gt;&amp;gt;, std::unique_ptr&amp;lt;bar&amp;gt;&amp;gt;&amp;lt;/bar&amp;gt;&amp;lt;/std::unique_ptr&amp;lt;foo&amp;gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Unicode on Windows for folder_exists, folder_create, folder_home,
 install_path</title><link href="https://sourceforge.net/p/stlplus/discussion/345536/thread/3c8b05b5/?limit=25#3376/0618" rel="alternate"/><published>2018-08-19T11:25:33.697000Z</published><updated>2018-08-19T11:25:33.697000Z</updated><author><name>Evgeny Pokhilko</name><uri>https://sourceforge.net/u/evpo/</uri></author><id>https://sourceforge.net21db28354f80426f76d02c642c00f2a0d057bb87</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Andy,&lt;/p&gt;
&lt;p&gt;I have made a simple tool for testing the modified functions:&lt;br/&gt;
&lt;a href="https://sourceforge.net/p/stlplus-testing/code/ci/master/tree/"&gt;https://sourceforge.net/p/stlplus-testing/code/ci/master/tree/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is a bash script called start.sh that will invoke the functions and make some preparations.&lt;/p&gt;
&lt;p&gt;This is work in progress. I will probably improve the tool going forward and run it on more platforms myself. This is a start.&lt;/p&gt;
&lt;p&gt;BTW I made my best not to change the behaviour and underlying code for all platforms except Windows. So a code review and more testing on Windows are the main steps.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Unicode on Windows for folder_exists, folder_create, folder_home,
 install_path</title><link href="https://sourceforge.net/p/stlplus/discussion/345536/thread/3c8b05b5/?limit=25#3376" rel="alternate"/><published>2018-08-12T21:38:06.273000Z</published><updated>2018-08-12T21:38:06.273000Z</updated><author><name>Andy Rushton</name><uri>https://sourceforge.net/u/userid-929741/</uri></author><id>https://sourceforge.netd753c838bae8d2378c7604e9f4153f0c27c6d35c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I did understand your point, I was saying that I would have solved the problem a similar way.&lt;/p&gt;
&lt;p&gt;However, a proof of concept would not be suitable for the stlplus library which is a mature project now. So any software that goes into it should be production quality. Also, it would need to have a test program that works on all platforms to confirm the portability requirements have been met.&lt;/p&gt;
&lt;p&gt;I will have another look at this in a few weeks when I have time to see if the proof of concept could be included and maybe look at how it could be tested,&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Unicode on Windows for folder_exists, folder_create, folder_home,
 install_path</title><link href="https://sourceforge.net/p/stlplus/discussion/345536/thread/3c8b05b5/?limit=25#2384" rel="alternate"/><published>2018-08-07T00:57:16.789000Z</published><updated>2018-08-07T00:57:16.789000Z</updated><author><name>Evgeny Pokhilko</name><uri>https://sourceforge.net/u/evpo/</uri></author><id>https://sourceforge.netcaa47899d6d4ef147032b0bdca2524e0bddd99f5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Andi,&lt;/p&gt;
&lt;p&gt;Sorry I was a bit unclear in my message. It was late at night when I wrote it.&lt;/p&gt;
&lt;p&gt;Replying to your paragraphs in order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I actually went ahead and made proof of concept changes in file_system.cpp (see the link in my message above). My code does exactly what you recommend. It retains the interface and converts  from UTF-8 to UTF-16 and back. I made the listed functions work with UTF-16. Please look at them.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;more concrete line number link to is_folder:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/evpo/EncryptPad/blob/93f524e3ff9556067491697aef34a201474945cf/deps/stlplus/portability/file_system.cpp#L527" rel="nofollow"&gt;https://github.com/evpo/EncryptPad/blob/93f524e3ff9556067491697aef34a201474945cf/deps/stlplus/portability/file_system.cpp#L527&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I only changed folder_exists, folder_create, folder_home, install_path to support UTF-16. &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The dissection will apply to UTF-8 strings where separating by '/' '\' should be OK. It is done in install_path and it seemed to work as expected when I tested.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I see your point. The changes I introduced use WinAPI directly.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Would you consider taking my changes implementing UTF-16 support to these functions? This would allow file_system to support UTF-16 gradually without breaking existing application.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>