<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8628867397165078694</id><updated>2012-01-15T18:34:57.090-08:00</updated><category term='makefiles'/><category term='IOStreams'/><category term='xContract'/><category term='COMSTL'/><category term='Pantheios'/><category term='plans'/><category term='std::string'/><category term='WinSTL'/><category term='books'/><category term='shims'/><category term='memory_mapped_file'/><category term='registry'/><category term='UNIXSTL'/><category term='strategy'/><category term='STLSoft 1.9'/><category term='access shims'/><category term='InetSTL'/><category term='parsing'/><category term='&quot;safe string&quot;'/><category term='integer_to_array'/><category term='reverse iterator'/><category term='type conversions'/><category term='race conditions'/><category term='exceptions'/><category term='C++'/><category term='FindFirstFile'/><category term='_CrtSetDbgFlag'/><category term='string_view'/><category term='error library'/><category term='cmake'/><category term='FastFormat'/><category term='recls'/><category term='variant'/><category term='inserter'/><category term='scoped_handle'/><category term='build systems'/><category term='standard library'/><category term='frequency_map'/><category term='PlatformSTL'/><category term='domain'/><category term='performance'/><category term='SourceForge'/><category term='xCover'/><category term='TR1'/><category term='exception-safety'/><category term='Monolith'/><category term='string access shims'/><category term='system'/><category term='64-bit'/><category term='dl_call'/><category term='Visual C++ 10'/><category term='Boost.Format'/><category term='_CRTDBG_ALLOC_MEM_DF'/><category term='Loki.SafeFormat'/><category term='Allocators'/><category term='Loki'/><category term='read_line'/><category term='STLSoft 1.10'/><category term='libraries'/><category term='Templates'/><category term='Extended STL'/><category term='split'/><category term='findfile_sequence'/><category term='filesystem'/><category term='iterator'/><category term='namespace'/><category term='container'/><category term='STL'/><category term='xTests'/><category term='article'/><category term='Type-tunnel'/><category term='testing'/><category term='release'/><category term='Visual C++'/><category term='Boost'/><category term='simple_string'/><category term='C++ Standard'/><category term='VOLE'/><category term='dependent libraries'/><category term='STLSoft'/><title type='text'>Musings on the life and times of the STLSoft libraries</title><subtitle type='html'>Musings of an &lt;a href="http://stlsoft.org"&gt; STL-extension library&lt;/a&gt; designer (who's renowned for producing high-quality software with low-quality documentation).</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>87</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1141510909806581170</id><published>2010-12-28T21:24:00.000-08:00</published><updated>2010-12-28T21:24:08.804-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scoped_handle'/><category scheme='http://www.blogger.com/atom/ns#' term='_CrtSetDbgFlag'/><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><category scheme='http://www.blogger.com/atom/ns#' term='_CRTDBG_ALLOC_MEM_DF'/><title type='text'>Scoping MSVCRT memory tracking flags with scoped_handle</title><content type='html'>Am just working on some diagnostic extras to be provided as a side-project for &lt;b&gt;&lt;a href="http://www.pantheios.org/"&gt;Pantheios&lt;/a&gt;&lt;/b&gt;, with a particular focus on &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;main()&lt;/span&gt;. In applying them to some of my system tool programs, I'm finding some false positive memory leaks being reported for &lt;b&gt;&lt;a href="http://www.fastformat.org/"&gt;FastFormat&lt;/a&gt;&lt;/b&gt;: this is because FastFormat caches parsed format strings, and they're not released until &lt;a href="http://www.fastformat.org/documentation/group__group____core__library.html#gf2c60668f7e7de7369bee0d0df3b5393"&gt;the library is uninitialised&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I want to "hide" these memory allocations from Visual C++'s CRT memory tracing functionality, and have found a neat little trick for doing so, using &lt;a href="http://www.stlsoft.org/"&gt;&lt;b&gt;STLSoft&lt;/b&gt;&lt;/a&gt;'s &lt;a href="http://www.stlsoft.org/doc-1.9/classstlsoft_1_1scoped__handle.html"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;scoped_handle&lt;/span&gt;&lt;/a&gt;, as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;#if defined(_DEBUG) &amp;amp;&amp;amp; \&lt;br /&gt;&amp;nbsp; &amp;nbsp; defined(STLSOFT_COMPILER_IS_MSVC)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int prev = &lt;a href="http://msdn.microsoft.com/en-us/library/5at7yxcs%28v=vs.71%29.aspx"&gt;_CrtSetDbgFlag&lt;/a&gt;(_CRTDBG_REPORT_FLAG);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _CrtSetDbgFlag(prev &amp;amp; ~_CRTDBG_ALLOC_MEM_DF);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;stlsoft::scoped_handle&lt;int&gt; scoper(prev, _CrtSetDbgFlag);&lt;/int&gt;&lt;/b&gt;&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . . . // allocate memory that wont' be recorded as leaks&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&amp;nbsp; } // MSVCRT settings reset here&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1141510909806581170?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1141510909806581170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1141510909806581170' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1141510909806581170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1141510909806581170'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/12/scoping-msvcrt-memory-tracking-flags.html' title='Scoping MSVCRT memory tracking flags with scoped_handle'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-5556366515995658339</id><published>2010-11-08T13:02:00.000-08:00</published><updated>2010-11-08T13:02:01.513-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='string access shims'/><category scheme='http://www.blogger.com/atom/ns#' term='shims'/><category scheme='http://www.blogger.com/atom/ns#' term='access shims'/><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>Wide String Shims for std::exception</title><content type='html'>The &lt;a href="http://sourceforge.net/news/?group_id=238860&amp;amp;id=293731"&gt;latest release&lt;/a&gt; of &lt;a href="http://www.stlsoft.org/"&gt;&lt;b&gt;STLSoft&lt;/b&gt;&lt;/a&gt; (1.9.102) includes wide string additions to the &lt;i&gt;string access shims&lt;/i&gt; for &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;std::exception&lt;/span&gt; (and derived types). The most obvious and immediate benefit is that code using &lt;a href="http://www.fastformat.org/"&gt;&lt;b&gt;FastFormat&lt;/b&gt;&lt;/a&gt; and/or &lt;a href="http://www.pantheios.org/"&gt;&lt;b&gt;Pantheios&lt;/b&gt;&lt;/a&gt; in wide string builds can now work seamlessly with exceptions, just as has always been the case in multibyte string builds:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;#include &amp;lt;fastformat/ff.hpp&amp;gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;. . . &lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;#include &amp;lt;pantheios/pan.hpp&amp;gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;. . .&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;int main()&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;{&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;. . . &lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; &lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; catch(std::exception&amp;amp; x)&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; {&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; &amp;nbsp; pan::log_CRITICAL(L"exception: ", x); &lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; &amp;nbsp; ff::fmtln(std::wcerr, L"program: {0}", x);&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; }&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;. . .&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-5556366515995658339?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/5556366515995658339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=5556366515995658339' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5556366515995658339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5556366515995658339'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/11/wide-string-shims-for-stdexception.html' title='Wide String Shims for std::exception'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-5042099852871821398</id><published>2010-06-22T22:23:00.000-07:00</published><updated>2012-01-15T18:26:44.222-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='&quot;safe string&quot;'/><title type='text'>Dealing with "deprecated" std::copy()</title><content type='html'>Although the issue of Microsoft having chosen, by the agency of its so-called "safe string" library, to deprecate large parts of the standard library in general, and &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;std::copy()&lt;/span&gt; in particular, is hardly new, there's still some confusion in the community about what to do about it, and how to work around it if that's what you choose to do.&lt;br /&gt;&lt;br /&gt;If, as I do on occasion, you choose not to suppress the warnings (by &lt;a href="http://msdn.microsoft.com/en-us/library/ttcz0bys.aspx"&gt;ignoring 4996&lt;/a&gt;, or by defining &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;_SCL_SECURE_NO_WARNINGS&lt;/span&gt;) but instead want to ignore specifically for &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;std::copy()&lt;/span&gt;, you can do it as follows:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;#include &amp;lt;stlsoft/algorithms/std/alt.hpp&amp;gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;#include &amp;lt;stlsoft/internal/safestr.h&amp;gt; &lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;#if defined(STLSOFT_USING_SAFE_STR_FUNCTIONS) &amp;amp;&amp;amp; \&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; defined(STLSOFT_COMPILER_IS_MSVC)&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;namespace &lt;b&gt;std&lt;/b&gt;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;{&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; using ::&lt;b&gt;stlsoft::std_copy&lt;/b&gt;;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# define copy&amp;nbsp;&amp;nbsp;&amp;nbsp; std_copy&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;}&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;#endif // compiler&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;By all means it's breaking the rules and introducing names into the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;std&lt;/span&gt; namespace. Nonetheless, we can sleep easy, since, hey, we didn't start the undermining of the standard!&lt;br /&gt;&lt;br /&gt;The other problem is that, currently, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stlsoft::std_copy()&lt;/span&gt; has no specialisations. It always uses long-hand iteration; no &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;memcpy()&lt;/span&gt;-based block copying for random access iterators to POD types.&lt;br /&gt;&lt;br /&gt;I hope you know me well enough by now for this to not need to be said. But it's important enough for me to have to say it explicitly, just in case: &lt;b&gt;do not use this technique in library headers!&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-5042099852871821398?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/5042099852871821398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=5042099852871821398' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5042099852871821398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5042099852871821398'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/06/dealing-with-deprecated-stdcopy.html' title='Dealing with &quot;deprecated&quot; std::copy()'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1929391561532092845</id><published>2010-06-06T17:31:00.000-07:00</published><updated>2010-06-06T17:31:41.554-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='split'/><category scheme='http://www.blogger.com/atom/ns#' term='simple_string'/><category scheme='http://www.blogger.com/atom/ns#' term='string_view'/><title type='text'>STLSoft 1.9.98 changes to stlsoft::split()</title><content type='html'>As of &lt;a href="http://sourceforge.net/news/?group_id=238860&amp;amp;id=287706"&gt;STLSoft  1.9.98&lt;/a&gt;, &lt;a href="http://www.stlsoft.org/doc-1.9/group__group____library____string.html#gddec5b0c18775155ad275423d0697ed5"&gt;stlsoft::split()&lt;/a&gt; has been enhanced to be able to split into between two and six fragments. Previously you would have use intermediates to split into more fields, as in:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;std::string line = "abc|def|ghi|jkl";&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stlsoft::string_view   dummy1;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stlsoft::string_view   dummy2;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stlsoft::string_view field0;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stlsoft::string_view field1;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stlsoft::string_view field2;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stlsoft::string_view field3;&lt;br /&gt;&lt;br /&gt;if(&lt;b&gt;stlsoft::split&lt;/b&gt;(line, '|', field0, dummy1) &amp;amp;&amp;amp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;b&gt;stlsoft::split&lt;/b&gt;(dummy1, '|', field1, dummy2) &amp;amp;&amp;amp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&lt;b&gt;stlsoft::split&lt;/b&gt;(dummy2, '|', field2, field3))&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; . . . // use fields&lt;br /&gt;}&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Although there's no additional memory allocation here - because we're using &lt;a href="http://www.drdobbs.com/184402064"&gt;string views&lt;/a&gt; as the intermediate and final fragment types - it's still hard to follow, and doing three separate split operations.&lt;br /&gt;&lt;br /&gt;You can now split directly into up to six fields, as in:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;std::string  line = "abc|def|ghi|jkl";&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stlsoft::string_view field0;&lt;/span&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stlsoft::string_view  field1;&lt;/div&gt;&lt;div&gt;&lt;div&gt;stlsoft::string_view field2;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stlsoft::string_view  field3;&lt;br /&gt;&lt;br /&gt;if(&lt;b&gt;stlsoft::split&lt;/b&gt;(line, '|', field0, field1, field2,  field3))&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; . . . // use fields&lt;br /&gt;}&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;It's marginally more efficient when&amp;nbsp;using &lt;a href="http://www.drdobbs.com/184402064"&gt;string views&lt;/a&gt;, and substantially more efficient when using string value types (such as &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;std::string&lt;/span&gt; and &lt;a href="http://www.stlsoft.org/doc-1.9/classstlsoft_1_1basic__simple__string.html"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stlsoft::simple_string&lt;/span&gt;&lt;/a&gt;). In either cases, it's considerably more transparent.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1929391561532092845?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1929391561532092845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1929391561532092845' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1929391561532092845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1929391561532092845'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/06/stlsoft-1998-changes-to-stlsoftsplit.html' title='STLSoft 1.9.98 changes to stlsoft::split()'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-3932261372295092883</id><published>2010-06-06T17:20:00.000-07:00</published><updated>2010-06-06T17:21:30.912-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='read_line'/><category scheme='http://www.blogger.com/atom/ns#' term='memory_mapped_file'/><title type='text'>STLSoft 1.9.98 changes to stlsoft::read_line()</title><content type='html'>As of &lt;a href="http://sourceforge.net/news/?group_id=238860&amp;amp;id=287706"&gt;STLSoft 1.9.98&lt;/a&gt;, &lt;a href="http://www.xstl.org/doc-1.9/namespacestlsoft.html#fb9508305daecd4f738b0ceb0cd005d7"&gt;stlsoft::read_line()&lt;/a&gt; can now read from an iterator range of arbitrary type. Where formerly it would only work with a C Stream (i.e. &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;FILE*&lt;/span&gt;), as in:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;std::string line;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;while(&lt;b&gt;stlsoft::read_line&lt;/b&gt;(stdin, line&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , stlsoft::read_line_flags::recogniseAll))&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;{&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; . . . // process line &lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now it will also work with an iterator range of arbitrary type, as in:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;b&gt;platformstl::memory_mapped_file&lt;/b&gt; f("file.txt");&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;char const* const begin = static_cast&lt;char const*=""&gt;(f.memory());&lt;/char&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;char const* const end = begin + f.size();&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;std::string  line;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;while(&lt;b&gt;stlsoft::read_line&lt;/b&gt;(begin, end,  line&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,  stlsoft::read_line_flags::recogniseAll))&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;{&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; . . . // process line &lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;}&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-3932261372295092883?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/3932261372295092883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=3932261372295092883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3932261372295092883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3932261372295092883'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/06/stlsoft-1998-changes-to-stlsoftreadline.html' title='STLSoft 1.9.98 changes to stlsoft::read_line()'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1368564768107197058</id><published>2010-06-06T17:03:00.000-07:00</published><updated>2010-06-06T17:20:53.655-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='split'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.10'/><category scheme='http://www.blogger.com/atom/ns#' term='read_line'/><title type='text'>STLSoft 1.9.98 released</title><content type='html'>&lt;a href="http://sourceforge.net/news/?group_id=238860&amp;amp;id=287706"&gt;STLSoft 1.9.98 is released&lt;/a&gt;, containing a bunch of enhancements for 64-bit compatibility, and in anticipation of STLSoft 1.10. The two particular additions of interest are:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stlsoft::split()&lt;/span&gt; can now split into more than two string fragments&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.stlsoft-musings.net/2010/06/stlsoft-1998-changes-to-stlsoftreadline.html"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; stlsoft::read_line()&lt;/span&gt; can now work with an iterator range of arbitrary type&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1368564768107197058?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1368564768107197058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1368564768107197058' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1368564768107197058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1368564768107197058'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/06/stlsoft-1998-released.html' title='STLSoft 1.9.98 released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1172196386609986256</id><published>2010-03-09T15:28:00.000-08:00</published><updated>2010-03-09T15:28:22.442-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual C++ 10'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual C++'/><title type='text'>STLSoft 1.9.96: Visual C++ support</title><content type='html'>The &lt;a href="https://sourceforge.net/projects/stlsoft/files/"&gt;latest STLSoft&lt;/a&gt; now supports Visual C++ 10.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1172196386609986256?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1172196386609986256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1172196386609986256' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1172196386609986256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1172196386609986256'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/03/stlsoft-1996-visual-c-support.html' title='STLSoft 1.9.96: Visual C++ support'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1399706116355568423</id><published>2010-03-08T20:15:00.000-08:00</published><updated>2010-03-08T20:19:49.094-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='recls'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual C++ 10'/><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual C++'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>VC++ 10 support imminent</title><content type='html'>Just added VC++ 10 support to &lt;a href="http://www.stlsoft.org/"&gt;STLSoft&lt;/a&gt;, and am proving it with builds of various dependent libraries, including &lt;a href="http://www.fastformat.org/"&gt;FastFormat&lt;/a&gt;, &lt;a href="http://www.pantheios.org/"&gt;Pantheios&lt;/a&gt; and &lt;a href="http://www.recls.org/"&gt;recls&lt;/a&gt;. Should be available very soon (1-2 days).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1399706116355568423?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1399706116355568423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1399706116355568423' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1399706116355568423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1399706116355568423'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/03/vc-10-support-imminent.html' title='VC++ 10 support imminent'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-7401377065860297744</id><published>2010-03-04T23:43:00.000-08:00</published><updated>2010-03-04T23:43:13.679-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='WinSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='UNIXSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='system'/><title type='text'>STLSoft 1.9.94: defective definition of swap() overloads for unixstl/winstl::memory_mapped_file corrected</title><content type='html'>As of &lt;a href="http://sourceforge.net/projects/stlsoft/files/"&gt;version 1.9.94&lt;/a&gt;, the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;swap()&lt;/span&gt; free function overloads for &lt;a href="http://www.stlsoft.org/doc-1.9/classunixstl_1_1memory__mapped__file.html"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;unixstl::memory_mapped_file&lt;/span&gt;&lt;/a&gt; and &lt;a href="http://www.stlsoft.org/doc-1.9/classwinstl_1_1memory__mapped__file.html"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;winstl::memory_mapped_file&lt;/span&gt;&lt;/a&gt; are now declared &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;inline&lt;/span&gt;, correcting a link-time error when linking multiple compilation units that use the component(s).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-7401377065860297744?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/7401377065860297744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=7401377065860297744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7401377065860297744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7401377065860297744'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/03/stlsoft-1994-defective-definition-of.html' title='STLSoft 1.9.94: defective definition of swap() overloads for unixstl/winstl::memory_mapped_file corrected'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-81282527218896863</id><published>2010-02-15T23:39:00.000-08:00</published><updated>2010-03-04T23:39:20.268-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='namespace'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>STLSoft 1.9.93: STLSOFT_CF_NAMESPACE_SUPPORT now only in C++ compilation units</title><content type='html'>As of &lt;a href="http://sourceforge.net/projects/stlsoft/files/"&gt;version 1.9.93&lt;/a&gt;, the symbol &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;STLSOFT_CF_NAMESPACE_SUPPORT&lt;/span&gt; is now defined only in C++ compilation units. Its (former) definition in C compilation units was meaningless, and put client code to more work, discrimination for &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;STLSOFT_CF_NAMESPACE_SUPPORT&lt;/span&gt; and for &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;__cplusplus&lt;/span&gt;. Now the former encapsulates both.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-81282527218896863?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/81282527218896863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=81282527218896863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/81282527218896863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/81282527218896863'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/03/stlsoft-1993-stlsoftcfnamespacesupport.html' title='STLSoft 1.9.93: STLSOFT_CF_NAMESPACE_SUPPORT now only in C++ compilation units'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1258778865357593976</id><published>2010-02-11T23:27:00.000-08:00</published><updated>2010-03-04T23:31:15.550-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='InetSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='filesystem'/><title type='text'>STLSoft 1.9.92: inetstl::filesystem_traits::is_path_name_separator() added</title><content type='html'>As of &lt;a href="http://sourceforge.net/projects/stlsoft/files/"&gt;version 1.9.92&lt;/a&gt;, &lt;a href="http://www.stlsoft.org/doc-1.9/structinetstl_1_1filesystem__traits.html"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;inetstl::filesystem_traits&lt;/span&gt;&lt;/a&gt; now has an &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;is_path_name_separator()&lt;/span&gt;, to ensure correct handle of paths that contain network (&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;'/'&lt;/span&gt;) and local (&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;'\\'&lt;/span&gt;) path name separators.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1258778865357593976?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1258778865357593976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1258778865357593976' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1258778865357593976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1258778865357593976'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/02/stlsoft-1992-inetstlfilesystemtraitsisp.html' title='STLSoft 1.9.92: inetstl::filesystem_traits::is_path_name_separator() added'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-6915025410868016127</id><published>2010-02-02T23:27:00.000-08:00</published><updated>2010-03-04T23:32:37.705-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='filesystem'/><category scheme='http://www.blogger.com/atom/ns#' term='WinSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='UNIXSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='PlatformSTL'/><title type='text'>STLSoft 1.9.91: platformstl::remove_directory_recurse()</title><content type='html'>As of version 1.9.91, the &lt;a href="http://www.stlsoft.org/doc-1.9/namespaceunixstl.html"&gt;UNIXSTL&lt;/a&gt;/&lt;a href="http://www.stlsoft.org/doc-1.9/namespacewinstl.html"&gt;WinSTL&lt;/a&gt; directory function &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;remove_directory_recurse()&lt;/span&gt; is introduced into the &lt;a href="http://www.stlsoft.org/doc-1.9/namespaceplatformstl.html"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;platformstl&lt;/span&gt;&lt;/a&gt; namespace.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-6915025410868016127?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/6915025410868016127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=6915025410868016127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/6915025410868016127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/6915025410868016127'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/03/stlsoft-1991-platformstlremovedirectory.html' title='STLSoft 1.9.91: platformstl::remove_directory_recurse()'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-4250878517236313927</id><published>2010-01-21T23:21:00.000-08:00</published><updated>2010-03-04T23:32:59.361-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='filesystem'/><category scheme='http://www.blogger.com/atom/ns#' term='UNIXSTL'/><title type='text'>STLSoft 1.9.90: unixstl::filesystem_traits::get_full_path_name() defect fixed</title><content type='html'>Prior to &lt;a href="http://sourceforge.net/projects/stlsoft/files/"&gt;version 1.9.90&lt;/a&gt;, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;unixstl::filesystem_traits::get_full_path_name()&lt;/span&gt; contained a defect, causing it to fault if passed &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;"."&lt;/span&gt; - indicating the local directory - and instead contain spurious information. This is now fixed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-4250878517236313927?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/4250878517236313927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=4250878517236313927' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4250878517236313927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4250878517236313927'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/03/stlsoft-1990-unixstlfilesystemtraitsget.html' title='STLSoft 1.9.90: unixstl::filesystem_traits::get_full_path_name() defect fixed'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-5258524811461963456</id><published>2010-01-12T23:50:00.000-08:00</published><updated>2010-03-04T23:35:31.787-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='reverse iterator'/><category scheme='http://www.blogger.com/atom/ns#' term='iterator'/><title type='text'>STLSoft 1.9.88: fixed conversion between const_reverse_iterator and reverse_iterator</title><content type='html'>For a long while, I've been aware of the limitations of the reverse iterator abstraction components in the STLSoft libraries - specifically&amp;nbsp; and&amp;nbsp; - which prevent assigning an instance of a collection's &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;reverse_iterator&lt;/span&gt; to an instance of its &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;const_reverse_iterator&lt;/span&gt;. This has caused trouble for me on occasion, and also &lt;a href="http://www.digitalmars.com/webnews/newsgroups.php?art_group=c%2B%2B.stlsoft&amp;amp;article_id=1937"&gt;for some users&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As of &lt;a href="http://sourceforge.net/projects/stlsoft/files/"&gt;version 1.9.88&lt;/a&gt; this has been addressed, via addition of conversion constructor template and operator != templates.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-5258524811461963456?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/5258524811461963456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=5258524811461963456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5258524811461963456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5258524811461963456'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/03/stlsoft-1988-fixed-conversion-between.html' title='STLSoft 1.9.88: fixed conversion between const_reverse_iterator and reverse_iterator'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-2694903505492870730</id><published>2010-01-12T23:30:00.000-08:00</published><updated>2010-03-04T23:34:47.057-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='findfile_sequence'/><category scheme='http://www.blogger.com/atom/ns#' term='Extended STL'/><title type='text'>STLSoft 1.9.88: throwOnAccessFailure search flag for winstl::basic_findfile_sequence</title><content type='html'>As &lt;a href="http://blog.stlsoft-musings.net/2009/11/stlsoft-1988-imminent.html"&gt;anticipated&lt;/a&gt;, &lt;a href="http://www.stlsoft.org/doc-1.9/classwinstl_1_1basic__findfile__sequence.html"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;winstl::basic_findfile_sequence&lt;/span&gt;&lt;/a&gt;, which is described in detail in &lt;a href="http://www.amazon.com/exec/obidos/ASIN/0321305507/impec-20"&gt;&lt;i&gt;Extended STL, volume 1&lt;/i&gt;&lt;/a&gt;, now defines, and responds to, the member constant &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;throwOnAccessFailure&lt;/span&gt;. In the case of an access failure an instance of &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;winstl::access_exception&lt;/span&gt; is thrown.&lt;br /&gt;&lt;br /&gt;This allows for better response in cases where access may be denied.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-2694903505492870730?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/2694903505492870730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=2694903505492870730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2694903505492870730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2694903505492870730'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/03/stlsoft-1988-throwonaccessfailure.html' title='STLSoft 1.9.88: throwOnAccessFailure search flag for winstl::basic_findfile_sequence'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-3361519649865967248</id><published>2010-01-12T22:40:00.000-08:00</published><updated>2010-03-04T23:35:16.076-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='filesystem'/><title type='text'>STLSoft 1.9.88: max_size() for file_path_buffer and path</title><content type='html'>As of &lt;a href="http://sourceforge.net/projects/stlsoft/files/"&gt;version 1.9.88&lt;/a&gt;, &lt;a href="http://www.stlsoft.org/doc-1.9/classwinstl_1_1basic__file__path__buffer.html"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;winstl::basic_file_path_buffer&lt;/span&gt;&lt;/a&gt; now has a (static) &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;max_size()&lt;/span&gt; method, and &lt;a href="http://www.stlsoft.org/doc-1.9/classwinstl_1_1basic__path.html#c5fe760af518b83d62d4ae9be7d14de3"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;winstl::basic_path::max_size()&lt;/span&gt;&lt;/a&gt; is changed to be static.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-3361519649865967248?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/3361519649865967248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=3361519649865967248' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3361519649865967248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3361519649865967248'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/03/stlsoft-1988-maxsize-for-filepathbuffer.html' title='STLSoft 1.9.88: max_size() for file_path_buffer and path'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1678926941309995271</id><published>2010-01-12T03:35:00.000-08:00</published><updated>2010-01-12T03:36:55.829-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='variant'/><category scheme='http://www.blogger.com/atom/ns#' term='COMSTL'/><title type='text'>STLSoft 1.9.88: all-integer handling for comstl::variant</title><content type='html'>The &lt;a href="http://sourceforge.net/projects/stlsoft/files/"&gt;latest release (1.9.88)&lt;/a&gt; of STLSoft contains an updated &lt;a href="http://www.stlsoft.org/doc-1.9/classcomstl_1_1variant.html"&gt;comstl::variant&lt;/a&gt; class. The previous version had three constructors for integer types: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;short&lt;/span&gt;, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;int&lt;/span&gt; and &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;long&lt;/span&gt;. The new version has six constructors for integer types: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sint8_t&lt;/span&gt;, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;uint8_t&lt;/span&gt;, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sint16_t&lt;/span&gt;, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;uint16_t&lt;/span&gt;, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sint32_t&lt;/span&gt;, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;uint32_t&lt;/span&gt;. (It also has &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;short&lt;/span&gt;, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;int&lt;/span&gt; and &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;long&lt;/span&gt; constructors for those compilers that have distinct types against the 8/16/32-fixed integer types; see chapter 29 of &lt;a href="http://www.imperfectcplusplus.com/"&gt;&lt;i&gt;Imperfect C++&lt;/i&gt;&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1678926941309995271?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1678926941309995271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1678926941309995271' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1678926941309995271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1678926941309995271'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/01/stlsoft-1988-all-integer-handling-for.html' title='STLSoft 1.9.88: all-integer handling for comstl::variant'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1268828613017989994</id><published>2010-01-11T18:51:00.000-08:00</published><updated>2010-01-11T18:51:00.102-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>STLSoft 1.9.88 released</title><content type='html'>&lt;b&gt;STLSoft 1.9.88&lt;/b&gt; is &lt;a href="http://sourceforge.net/projects/stlsoft/files/"&gt;released today&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This version will be required for forthcoming releases, including:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;STLSoft (1.10)&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.fastformat.org/"&gt;FastFormat&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://recls.org/"&gt;recls&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://vole.sourceforge.net/"&gt;VOLE&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1268828613017989994?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1268828613017989994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1268828613017989994' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1268828613017989994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1268828613017989994'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2010/01/stlsoft-1988-released.html' title='STLSoft 1.9.88 released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-2731018625983897633</id><published>2009-11-21T20:47:00.000-08:00</published><updated>2009-11-21T20:47:05.236-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='recls'/><category scheme='http://www.blogger.com/atom/ns#' term='findfile_sequence'/><title type='text'>STLSoft 1.9.88 imminent</title><content type='html'>I'm just preparing a new release of &lt;a href="http://www.recls.org/"&gt;recls&lt;/a&gt;, and in the process have needed to enhance &lt;a href="http://www.stlsoft.org/doc-1.9/classwinstl_1_1basic__findfile__sequence.html" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;winstl::basic_findfile_sequence&lt;/a&gt;, adding a new &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;throwOnAccessFailure&lt;/span&gt; flag, which (as should be obvious from the name), causes an exception to be thrown in the event of access failure. This will allow consistent behaviour between &lt;a href="http://www.recls.org/"&gt;recls (C/C++)&lt;/a&gt; and the new &lt;a href="http://www.recls.net/"&gt;recls 100% .NET&lt;/a&gt; library.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-2731018625983897633?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/2731018625983897633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=2731018625983897633' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2731018625983897633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2731018625983897633'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/11/stlsoft-1988-imminent.html' title='STLSoft 1.9.88 imminent'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-5349759659249753371</id><published>2009-05-29T19:28:00.000-07:00</published><updated>2010-03-05T13:06:34.906-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='frequency_map'/><category scheme='http://www.blogger.com/atom/ns#' term='container'/><title type='text'>frequency_map: new merge() method</title><content type='html'>The &lt;a href="http://www.stlsoft.org/doc-1.9/classstlsoft_1_1frequency__map.html"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;stlsoft::frequency_map&lt;/span&gt;&lt;/a&gt; container class template now includes a &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;merge()&lt;/span&gt; method, which allows the contents from two frequency map instances to be merged into one, as in:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; typedef std::string string_t;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; typedef stlsoft::frequency_map&amp;lt;string_t&amp;gt; fmap_t;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; fmap_t map1;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; fmap_t map2;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; map1.push("key-11");&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; map1.push("key-22");&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_BOOLEAN_FALSE(map1.empty());&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(2u, map1.size());&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(1u, map1["key-11"]);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(1u, map1["key-22"]);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; map2.push("key-11");&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; map2.push("key-21");&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_BOOLEAN_FALSE(map2.empty());&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(2u, map2.size());&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(1u, map2["key-11"]);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(1u, map2["key-21"]);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; map1.merge(map2);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_BOOLEAN_FALSE(map1.empty());&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(3u, map1.size());&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(2u, map1["key-11"]);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(1u, map1["key-21"]);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(1u, map1["key-22"]);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_BOOLEAN_FALSE(map2.empty());&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(2u, map2.size());&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(1u, map2["key-11"]);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(1u, map2["key-21"]);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; map2.clear();&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_BOOLEAN_FALSE(map1.empty());&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(3u, map1.size());&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(2u, map1["key-11"]);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(1u, map1["key-21"]);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(1u, map1["key-22"]);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_INTEGER_EQUAL(0u, map2.size());&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; XTESTS_TEST_BOOLEAN_TRUE(map2.empty());&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-5349759659249753371?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/5349759659249753371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=5349759659249753371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5349759659249753371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5349759659249753371'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/05/frequencymap-new-merge-method.html' title='frequency_map: new merge() method'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-162798142392125721</id><published>2009-05-23T14:23:00.000-07:00</published><updated>2009-05-23T16:22:00.917-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='integer_to_array'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.10'/><title type='text'>STLSoft 1.10 new additions: integer_to_array()</title><content type='html'>A new component with &lt;a href="http://www.stlsoft.org/"&gt;STLSoft&lt;/a&gt; 1.10 (&lt;a href="https://sourceforge.net/project/showfiles.php?group_id=238860&amp;amp;package_id=294944"&gt;alpha 11&lt;/a&gt; onwards) is the &lt;span style="font-family: courier new;"&gt;stlsoft::integer_to_array()&lt;/span&gt; function template. It is used to turn a single integer value into an array of bit-chunk values.&lt;br /&gt;&lt;br /&gt;For example, given the integer &lt;span style="font-family: courier new;"&gt;i with value 0x01020304&lt;/span&gt;, we can split this into the 8 nibbles as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;stlsoft::integer_array  r = stlsoft::integer_to_array(i, 4);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;r[0]&lt;/span&gt; will be 4, &lt;span style="font-family: courier new;"&gt;r[1]&lt;/span&gt; will be 0, &lt;span style="font-family: courier new;"&gt;r[2]&lt;/span&gt; will be 3, &lt;span style="font-family: courier new;"&gt;r[3]&lt;/span&gt; will be 0, &lt;span style="font-family: courier new;"&gt;r[4]&lt;/span&gt; will be 2, &lt;span style="font-family: courier new;"&gt;r[5]&lt;/span&gt; will be 0, &lt;span style="font-family: courier new;"&gt;r[6]&lt;/span&gt; will be 1, and &lt;span style="font-family: courier new;"&gt;r[7]&lt;/span&gt; will be 0.&lt;br /&gt;&lt;br /&gt;The split can be on any value between 0 and the bitsize of the input parameter (which can be any of the integral types); so you can split on 3 bits, 1 bit, 17 bits, whatever.&lt;br /&gt;&lt;br /&gt;I've done extensive automated tests, and they all pass (natch), but I'm still a &lt;i&gt;little&lt;/i&gt; dubious about the component, so I'm definitely interested in feedback.&lt;br /&gt;&lt;br /&gt;In case you're wondering, the original rationale for this was a simple way to go from the &lt;span style="font-family: courier new;"&gt;s_addr&lt;/span&gt; member of &lt;span style="font-family: courier new;"&gt;struct in_addr&lt;/span&gt;, which is held in network byte order but is otherwise "opaque".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-162798142392125721?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/162798142392125721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=162798142392125721' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/162798142392125721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/162798142392125721'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/05/stlsoft-110-new-additions.html' title='STLSoft 1.10 new additions: integer_to_array()'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1094656175323253325</id><published>2009-05-23T14:12:00.000-07:00</published><updated>2009-05-23T14:23:03.249-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='64-bit'/><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>LP64 and -Wshorten-64-to-32</title><content type='html'>Along with new Mac OS-X 64-bit makefiles for &lt;a href="http://www.fastformat.org/"&gt;FastFormat&lt;/a&gt; and &lt;a href="http://www.pantheios.org/"&gt;Pantheios&lt;/a&gt;, I'm also playing around with the &lt;span style="font-family: courier new;"&gt;-Wshorten-64-to-32&lt;/span&gt; warning flag.&lt;br /&gt;&lt;br /&gt;In compiling FF with this I encountered a lot of similars, amounting to the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;enum { x = sizeof(Y) };&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Obviously an &lt;span style="font-family: courier new;"&gt;enum&lt;/span&gt;, being &lt;span style="font-family: courier new;"&gt;int&lt;/span&gt; in size, is too small to hold &lt;span style="font-family: courier new;"&gt;size_t&lt;/span&gt; (the result of &lt;span style="font-family: courier new;"&gt;sizeof&lt;/span&gt; operator). The ugly but effective solution to this is:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;enum { x = int(sizeof(Y)) };&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;which you'll now see more of in the &lt;a href="http://www.stlsoft.org/"&gt;STLSoft&lt;/a&gt; libs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1094656175323253325?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1094656175323253325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1094656175323253325' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1094656175323253325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1094656175323253325'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/05/lp64-and-wshorten-64-to-32.html' title='LP64 and -Wshorten-64-to-32'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-3040742993485850601</id><published>2009-05-22T20:15:00.000-07:00</published><updated>2009-05-23T00:16:24.068-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='SourceForge'/><category scheme='http://www.blogger.com/atom/ns#' term='&quot;safe string&quot;'/><category scheme='http://www.blogger.com/atom/ns#' term='error library'/><title type='text'>Safely abstracting use of strerror / strerror_s (part 1)</title><content type='html'>A &lt;a href="https://sourceforge.net/tracker/?func=detail&amp;amp;aid=2795655&amp;amp;group_id=238860&amp;amp;atid=1107746"&gt;recent bug report&lt;/a&gt; on the &lt;a href="http://www.sourceforge.net/projects/stlsoft"&gt;STLSoft SourceForge project site&lt;/a&gt; reported that the &lt;a style="font-family: courier new;" href="http://www.stlsoft.org/doc-1.9/classstlsoft_1_1basic__error__desc.html"&gt;stlsoft::error_desc&lt;/a&gt; component did not use the new "safe string" library function &lt;a href="http://msdn.microsoft.com/en-us/library/51sah927%28VS.80%29.aspx"&gt;&lt;span style="font-family:courier new;"&gt;strerror_s()&lt;/span&gt;&lt;/a&gt;. This was actually a surprise, because I thought I'd already taken care of that.&lt;br /&gt;&lt;br /&gt;Since I hadn't, I decided that I should. The change in implementation to use &lt;span style="font-family: courier new;"&gt;strerror_s()&lt;/span&gt; (when in the presence of the "safe string" library) goes along the lines of the following&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: courier new;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;char buff[1001];&lt;br /&gt;if(0 != ::strerror_s(buff, &lt;br /&gt;            STLSOFT_NUM_ELEMENTS(buff) - 1, errno))&lt;br /&gt;{&lt;br /&gt;  buff[0] = '\0';&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;  buff[STLSOFT_NUM_ELEMENTS(buff) - 1] = '\0';&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The dumb part of the &lt;span style="font-family: courier new;"&gt;strerror_s()&lt;/span&gt; function is that it doesn't tell you how many characters were received. This means that you cannot rely on having elicited the full message unless &lt;span style="font-family: courier new;"&gt;::strlen()&lt;/span&gt; over the returned string is less than (buffer size - 1). So, the above code &lt;span style="font-style: italic;"&gt;could&lt;/span&gt; return a partial error string (although the likelihood of that is, of course, vanishingly small).&lt;br /&gt;&lt;br /&gt;Instead, what I've done is used an &lt;a href="http://www.stlsoft.org/doc-1.9/classstlsoft_1_1auto__buffer.html"&gt;auto_buffer&lt;/a&gt; to provide resizable storage, and then &lt;span style="font-family: courier new;"&gt;strerror_s()&lt;/span&gt; is called in a loop until either it fails, or no more storage can be allocated, or the length of the returned string is less than (buffer size - 1). The code looks like the following:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: courier new;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;stlsoft::auto_buffer&lt;char, 128&gt; buff(128);&lt;br /&gt;&lt;br /&gt;for(;;)&lt;br /&gt;{&lt;br /&gt;  int n = ::strerror_s(&amp;buff[0], buff.size() - 1, error);&lt;br /&gt;&lt;br /&gt;  buff[buff.size() - 1u] = '\0';&lt;br /&gt;&lt;br /&gt;  if(0 == n)&lt;br /&gt;  {&lt;br /&gt;    size_t cch = ::strlen(buff.data());&lt;br /&gt;&lt;br /&gt;    if(cch &lt; buff.size() - 2u)&lt;br /&gt;    {&lt;br /&gt;      m_length = cch;&lt;br /&gt;      buff.resize(cch + 1u);&lt;br /&gt;      break;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  if(!buff.resize(1u + buff.size() * 2u))&lt;br /&gt;  {&lt;br /&gt;    buff.resize(1u);&lt;br /&gt;    break;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;There's another problem with the class template, but that'll have to wait until a later time to discuss ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-3040742993485850601?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/3040742993485850601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=3040742993485850601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3040742993485850601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3040742993485850601'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/05/safely-abstracting-use-of-strerror.html' title='Safely abstracting use of strerror / strerror_s (part 1)'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-8041378035298747449</id><published>2009-05-18T01:49:00.001-07:00</published><updated>2010-01-12T03:11:01.669-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='exception-safety'/><category scheme='http://www.blogger.com/atom/ns#' term='WinSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='registry'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>WinSTL Registry library mods and fixes, part 3: exception-safety</title><content type='html'>In reviewing the implementation of the WinSTL Registry Library's &lt;a href="http://www.stlsoft.org/doc-1.9/classwinstl_1_1basic__reg__value.html" style="font-family: courier new;"&gt;winstl::basic_reg_value&lt;/a&gt; class - as described in &lt;a href="http://blog.stlsoft-musings.net/2009/05/winstl-registry-library-mods-and-fixes.html"&gt;part 1&lt;/a&gt; and &lt;a href="http://blog.stlsoft-musings.net/2009/05/winstl-registry-library-mods-and-fixes_8760.html"&gt;part 2&lt;/a&gt; of this series of posts - I've also spotted a defect in exception-safety.&lt;br /&gt;&lt;br /&gt;Consider the (chopped-down) definition of the &lt;span style="font-family: courier new;"&gt;basic_reg_value&lt;/span&gt; class:&lt;br /&gt;&lt;pre&gt;template &amp;lt; . . . &amp;gt;&lt;br /&gt;class basic_reg_value&lt;br /&gt;{&lt;br /&gt;. . .&lt;br /&gt;private:&lt;br /&gt;hkey_type    m_hkey; // The parent key of the value&lt;br /&gt;string_type  m_name; // The name of the value&lt;br /&gt;. . . // other members&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-family: courier new;"&gt;m_hkey&lt;/span&gt; member is obtained via &lt;span style="font-family: courier new;"&gt;winstl::reg_traits&amp;lt;&amp;gt;::reg_dup_key()&lt;/span&gt;. It is the &lt;span style="font-family: courier new;"&gt;basic_reg_value&lt;/span&gt; class itself that provides the &lt;a href="http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization"&gt;RAII&lt;/a&gt;. Consequently, if any exception occur during its constructor, the release of &lt;span style="font-family: courier new;"&gt;m_hkey&lt;/span&gt; will &lt;i&gt;not&lt;/i&gt; be carried out.&lt;br /&gt;&lt;br /&gt;Since the &lt;span style="font-family: courier new;"&gt;m_name&lt;/span&gt; is a string class instance, its constructor can throw. Consequently, &lt;span style="font-family: courier new;"&gt;basic_reg_value&lt;/span&gt; is not exception safe.&lt;br /&gt;&lt;br /&gt;Thankfully, the fix is very simple. Simply reverse the order of declaration of the two members. If &lt;span style="font-family: courier new;"&gt;m_name&lt;/span&gt;'s constructor throws, that'll happen &lt;i&gt;before&lt;/i&gt; the key duplication takes place. If the key duplication throws an exception, the (fully constructed) &lt;span style="font-family: courier new;"&gt;m_name&lt;/span&gt;'s destructor will be invoked. Q.E.D.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-8041378035298747449?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/8041378035298747449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=8041378035298747449' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8041378035298747449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8041378035298747449'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/05/winstl-registry-library-mods-and-fixes_742.html' title='WinSTL Registry library mods and fixes, part 3: exception-safety'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1233070186595050396</id><published>2009-05-18T01:21:00.000-07:00</published><updated>2010-01-12T03:11:07.034-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='WinSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='registry'/><category scheme='http://www.blogger.com/atom/ns#' term='race conditions'/><title type='text'>WinSTL Registry library mods and fixes, part 2: race conditions</title><content type='html'>As discussed at great length in section 33.3 of &lt;a href="http://www.extendedstl.com/"&gt;&lt;span style="font-style: italic;"&gt;Extended STL, volume 1&lt;/span&gt;&lt;/a&gt;, the Windows Registry API is one that is prone to race conditions, due to the fact that separate processes may make independent changes to the registry contents without any control over each other.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://blog.stlsoft-musings.net/2009/05/winstl-registry-library-mods-and-fixes.html"&gt;recently discovered defect&lt;/a&gt; in the &lt;a href="http://www.stlsoft.org/doc-1.9/group__group____library____windows__registry.html"&gt;WinSTL Registry Library&lt;/a&gt;'s &lt;a href="http://www.stlsoft.org/doc-1.9/classwinstl_1_1basic__reg__value.html" style="font-family: courier new;"&gt;winstl::basic_reg_value&lt;/a&gt; class, gave me cause to consider the implementation in detail again. It's been a long time since I've done that, and with the understanding of the registry race-conditions I gained while researching and writing &lt;a href="http://www.extendedstl.com/"&gt;Extended STL&lt;/a&gt;, I saw immediately the possibility of such a race accounting for the &lt;a href="http://blog.stlsoft-musings.net/2009/05/winstl-registry-library-mods-and-fixes.html"&gt;reported fault&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Consider again the implementation of &lt;a href="http://www.stlsoft.org/doc-1.9/reg__value_8hpp-source.html#l00561"&gt;&lt;span style="font-family: courier new;"&gt;winstl::basic_reg_value&amp;lt;&amp;gt;::value_sz() method&lt;/span&gt;&lt;/a&gt;. Assume that prior to the invocation of &lt;span style="font-family: courier new;"&gt;winstl::reg_traits&amp;lt;&amp;gt;::reg_query_info&lt;/span&gt; that the registry-value's value was non-zero size. The call commences. Meanwhile, another process overwrites the registry-value, with a zero size. &lt;span style="font-family: courier new;"&gt;reg_query_info&lt;/span&gt; returns, and indicates that the data size is zero. Without a further check on the data size, the &lt;a href="http://www.digitalmars.com/webnews/newsgroups.php?art_group=c%2B%2B.stlsoft&amp;amp;article_id=1866"&gt;same fault&lt;/a&gt; will be experienced. Naturally, the fix for the non-race defect will fix the race one as well. Which is nice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1233070186595050396?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1233070186595050396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1233070186595050396' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1233070186595050396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1233070186595050396'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/05/winstl-registry-library-mods-and-fixes_8760.html' title='WinSTL Registry library mods and fixes, part 2: race conditions'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-4263220073811498551</id><published>2009-05-18T00:59:00.001-07:00</published><updated>2010-01-12T03:11:12.364-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='WinSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='registry'/><title type='text'>WinSTL Registry library mods and fixes, part 1: empty values</title><content type='html'>An &lt;a href="http://www.stlsoft.org/"&gt;STLSoft&lt;/a&gt; user &lt;a href="http://www.digitalmars.com/webnews/newsgroups.php?art_group=c%2B%2B.stlsoft&amp;amp;article_id=1866"&gt;recently posted&lt;/a&gt; a possible defect in the implementation of the &lt;a href="http://www.stlsoft.org/doc-1.9/group__group____library____windows__registry.html"&gt;WinSTL Registry Library&lt;/a&gt;'s &lt;a href="http://www.stlsoft.org/doc-1.9/classwinstl_1_1basic__reg__value.html" style="font-family: courier new;"&gt;winstl::basic_reg_value&lt;/a&gt; class, reporting that a registry value (of type &lt;span style="font-family: courier new;"&gt;REG_SZ&lt;/span&gt;) yields a data value of size 0, leading to a crash.&lt;br /&gt;&lt;br /&gt;Upon first examination, I thought this was a result of the fragility of the Windows Registry with respect to race conditions, as I'll discuss in &lt;a href="http://blog.stlsoft-musings.net/2009/05/winstl-registry-library-mods-and-fixes_8760.html"&gt;a follow-up post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;However, closer examination reveals it to be a true defect. The precise circumstances in which this occur are as follows:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;the registry-value whose value is being elicited - as a string (&lt;span style="font-family: courier new;"&gt;REG_SZ&lt;/span&gt;)  or as an array of strings  (&lt;span style="font-family: courier new;"&gt;REG_MULTI_SZ&lt;/span&gt;) has zero size, &lt;span style="font-style: italic;"&gt;and&lt;/span&gt;&lt;/li&gt;&lt;li&gt;it has one or more peer registry-values whose values are of non-zero size&lt;/li&gt;&lt;/ul&gt;This precise set of circumstances causes the defect to fault. The reason lies in a call to &lt;span style="font-family: courier new;"&gt;winstl::reg_traits&amp;lt;&amp;gt;::reg_query_info&lt;/span&gt; at the start of the &lt;a href="http://www.stlsoft.org/doc-1.9/reg__value_8hpp-source.html#l00561"&gt;&lt;span style="font-family: courier new;"&gt;winstl::basic_reg_value&amp;lt;&amp;gt;::value_sz() method&lt;/span&gt;&lt;/a&gt;. This is used to determine the maximum size of the value of any if the current key's registry-values. This is useful to be able to provide a buffer of the appropriate size to the subsequent call to &lt;span style="font-family: courier new;"&gt;winstl::reg_traits&amp;lt;&amp;gt;::reg_query_value()&lt;/span&gt;, which actually retrieves the value in question.&lt;br /&gt;&lt;br /&gt;The problem occurs when the value's size is 0. The last block in the method decrements this - to account for the space for the nul-terminator added earlier - and then explicitly sets the nul-terminator. (I actually forget why it does this, but I do recall that it must be done this way.)&lt;br /&gt;&lt;br /&gt;Anyway, when the value's size is 0, decrementing it gives a very large number, and so the next statement results in an access-violation. Yuck!&lt;br /&gt;&lt;br /&gt;STLSoft 1.9.83 will contain the fix for this, which is simply to test again that the data size is non-0.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-4263220073811498551?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/4263220073811498551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=4263220073811498551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4263220073811498551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4263220073811498551'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/05/winstl-registry-library-mods-and-fixes.html' title='WinSTL Registry library mods and fixes, part 1: empty values'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-8709079960035065235</id><published>2009-05-15T14:03:00.000-07:00</published><updated>2010-01-12T03:11:16.243-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='WinSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='registry'/><title type='text'>More 1.9.82 ...</title><content type='html'>&lt;a href="https://sourceforge.net/forum/forum.php?forum_id=954605"&gt;It&lt;/a&gt; also includes a new method in &lt;a href="http://www.stlsoft.org/doc-1.9/structwinstl_1_1reg__traits.html"&gt;winstl::reg_traits&lt;/a&gt;::&lt;span style="font-family: 'courier new';"&gt;reg_delete_tree()&lt;/span&gt;, which takes a key handle and a sub-key name, and deletes the sub-key and any/all its descendent keys, as in:&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'courier new';"&gt;HKEY k = . . .&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'courier new';"&gt;LONG res = winstl::reg_traits&amp;lt;char&amp;gt;::reg_delete_tree(k, "sub-key");&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use with care, because there's no un-delete!&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-8709079960035065235?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/8709079960035065235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=8709079960035065235' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8709079960035065235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8709079960035065235'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/05/more-1982.html' title='More 1.9.82 ...'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-756483562683873697</id><published>2009-05-15T13:55:00.000-07:00</published><updated>2010-01-12T03:11:20.508-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.9'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='findfile_sequence'/><title type='text'>Catching up with developments ... 1.9.82</title><content type='html'>I've been lax in the blogging - too much to do, too little time - but will try and catch up.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The &lt;a href="https://sourceforge.net/forum/forum.php?forum_id=954605"&gt;latest release&lt;/a&gt;&amp;nbsp;includes a fix to allow &lt;a href="http://www.stlsoft.org/doc-1.9/winstl_2filesystem_2findfile__sequence_8hpp.html"&gt;&lt;span style="font-family: 'courier new';"&gt;winstl::findfile_sequence&lt;/span&gt;&lt;/a&gt;&amp;nbsp;- a facade over the &lt;a href="http://msdn.microsoft.com/en-us/library/aa364418%28VS.85%29.aspx"&gt;FindFirstFile/FindNextFile API&lt;/a&gt; to be used with &lt;span style="font-family: 'courier new';"&gt;std::copy&lt;/span&gt; and the IOStreams, as in:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;stlsoft/iterators/ostream_iterator.hpp&amp;gt;&lt;br /&gt;&lt;div&gt;#include &amp;lt;winstl/filesystem/findfile_sequence.hpp&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;int main()&lt;br /&gt;&lt;/div&gt;&lt;div&gt;{&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;typedef winstl::findfile_sequence seq_t;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;{ &amp;nbsp;// 1. enumerate all contents (except dots dirs)&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;seq_t &amp;nbsp;entries("*.*");&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;std::cout &amp;lt;&amp;lt; "\n1:\n";&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;std::copy(&lt;span style="white-space: pre;"&gt; &lt;/span&gt;entries.begin(), entries.end()&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;    &lt;/span&gt;,&lt;span style="white-space: pre;"&gt; &lt;/span&gt;stlsoft::ostream_iterator&amp;lt;seq_t::value_type&amp;gt;(std::cout, "\t", "\n"));&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;{ // 2. enumerate all contents (including dots dirs)&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;seq_t &amp;nbsp;entries("*.*", seq_t::includeDots);&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;std::cout &amp;lt;&amp;lt; "\n2:\n";&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;std::copy(&lt;span style="white-space: pre;"&gt; &lt;/span&gt;entries.begin(), entries.end()&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;    &lt;/span&gt;,&lt;span style="white-space: pre;"&gt; &lt;/span&gt;stlsoft::ostream_iterator&amp;lt;seq_t::value_type&amp;gt;(std::cout, "\t", "\n"));&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;{ &amp;nbsp;// 3. enumerate all files, displaying only the relative path&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;seq_t &amp;nbsp;files("*.*", seq_t::files | seq_t::relativePath);&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;std::cout &amp;lt;&amp;lt; "\n3:\n";&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;std::copy(&lt;span style="white-space: pre;"&gt; &lt;/span&gt;files.begin(), files.end()&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;    &lt;/span&gt;,&lt;span style="white-space: pre;"&gt; &lt;/span&gt;stlsoft::ostream_iterator&amp;lt;seq_t::value_type&amp;gt;(std::cout, "\t", "\n"));&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;{ &amp;nbsp;// 4. enumerate all directories&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;seq_t &amp;nbsp;directories("*.*", seq_t::directories);&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;std::cout &amp;lt;&amp;lt; "\n4:\n";&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;std::copy(&lt;span style="white-space: pre;"&gt; &lt;/span&gt;directories.begin(), directories.end()&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;    &lt;/span&gt;,&lt;span style="white-space: pre;"&gt; &lt;/span&gt;stlsoft::ostream_iterator&amp;lt;seq_t::value_type&amp;gt;(std::cout, "\t", "\n"));&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;{ &amp;nbsp;// 5. enumerate all files beginning with 'f' and with either extension .h or .hpp&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;seq_t &amp;nbsp;files("f*.h|f*.hpp", '|', seq_t::files);&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;std::cout &amp;lt;&amp;lt; "\n5:\n";&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;std::copy(&lt;span style="white-space: pre;"&gt; &lt;/span&gt;files.begin(), files.end()&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;    &lt;/span&gt;,&lt;span style="white-space: pre;"&gt; &lt;/span&gt;stlsoft::ostream_iterator&amp;lt;seq_t::value_type&amp;gt;(std::cout, "\t", "\n"));&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;{ &amp;nbsp;// 6. enumerate all .exe files in the windows directory and all dlls in the system directory that begin with 'm', skipping any hidden files&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;seq_t &amp;nbsp;files("C:\\windows", "*.exe;system32/m*.dll", ';', seq_t::files | seq_t::skipHiddenFiles);&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;std::cout &amp;lt;&amp;lt; "\n6:\n";&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;  &lt;/span&gt;std::copy(&lt;span style="white-space: pre;"&gt; &lt;/span&gt;files.begin(), files.end()&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;    &lt;/span&gt;,&lt;span style="white-space: pre;"&gt; &lt;/span&gt;stlsoft::ostream_iterator&amp;lt;seq_t::value_type&amp;gt;(std::cout, "\t", "\n"));&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;return EXIT_SUCCESS;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/* ///////////////////////////// end of file //////////////////////////// */&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-756483562683873697?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/756483562683873697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=756483562683873697' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/756483562683873697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/756483562683873697'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/05/catching-up-with-developments-1982.html' title='Catching up with developments ... 1.9.82'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-2292326036457962194</id><published>2009-01-24T15:18:00.000-08:00</published><updated>2009-01-24T15:38:25.168-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='WinSTL'/><category scheme='http://www.blogger.com/atom/ns#' term='FindFirstFile'/><category scheme='http://www.blogger.com/atom/ns#' term='Extended STL'/><title type='text'>memcpy() / bcopy() / strncpy(): char_copy()</title><content type='html'>Well, as you've probably already noticed, I've started removing dependencies on the so-called "unsafe" string library functions from all my open-source libraries.&lt;br /&gt;&lt;br /&gt;As part of this continuing (and somewhat life-sapping) activity, I'm moving through the &lt;a href="http://www.stlsoft.org/"&gt;STLSoft&lt;/a&gt; libraries. The &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=238860&amp;amp;package_id=290378"&gt;latest release&lt;/a&gt; incorporates changes to the important &lt;a href="http://www.stlsoft.org/doc-1.9/classwinstl_1_1basic__findfile__sequence.html"&gt;winstl::basic_findfile_sequence&lt;/a&gt; class template, which is an &lt;a href="http://www.extendedstl.com/"&gt;STL extension&lt;/a&gt; over the Windows &lt;a href="http://msdn.microsoft.com/en-us/library/aa364418(VS.85).aspx"&gt;FindFile API&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This makes use of a new facility that's been added to the &lt;a href="http://www.stlsoft.org/doc-1.9/structwinstl_1_1system__traits.html"&gt;winstl::system_traits&lt;/a&gt; class templates: &lt;span style="font-family:courier new;"&gt;char_copy()&lt;/span&gt;. This (static) function is effectively a typed &lt;span style="font-family:courier new;"&gt;memcpy()&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;class winstl::system_traits&amp;lt;char&gt;&lt;br /&gt;{&lt;br /&gt;  . . .&lt;br /&gt;public:&lt;br /&gt;&amp;nbsp;&amp;nbsp;char* &lt;b&gt;char_copy&lt;/b&gt;(char* dest, char const* src, size_t n); &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class winstl::system_traits&amp;lt;wchar_t&gt;&lt;br /&gt;{&lt;br /&gt;  . . .&lt;br /&gt;public:&lt;br /&gt;&amp;nbsp;&amp;nbsp;wchar_t* &lt;b&gt;char_copy&lt;/b&gt;(wchar_t* dest, wchar_t const* src, size_t n); &lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It copies exactly the number of characters specified, with no checks on the actual length of &lt;span style="font-family:courier new;"&gt;src&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The modest benefits are that it is a bit type-safe, and that you don't have to keep having to remember &lt;span style="font-family:courier new;"&gt;sizeof(char_type) * n&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I'm not totally struck on the name, and did consider borrowing other names. I liked BSD's &lt;span style="font-family:courier new;"&gt;&lt;a href="http://www.opengroup.org/onlinepubs/000095399/functions/bcopy.html"&gt;bcopy()&lt;/a&gt;&lt;/span&gt; (to mean block copy), but it's too likely that some code somewhere &lt;span style="font-family:courier new;"&gt;#define&lt;/span&gt;s it to &lt;span style="font-family:courier new;"&gt;memcpy()&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I'll gradually filter &lt;span style="font-family:courier new;"&gt;char_copy()&lt;/span&gt; throughout the rest of WinSTL, and then through UNIXSTL, as I work my way through the thankless task of getting "unsafe"-free. Ho hum.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-2292326036457962194?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/2292326036457962194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=2292326036457962194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2292326036457962194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2292326036457962194'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/01/memcpy-bcopy-strncpy-charcopy.html' title='memcpy() / bcopy() / strncpy(): char_copy()'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-7690906230412480250</id><published>2009-01-21T22:54:00.000-08:00</published><updated>2009-01-23T03:02:16.363-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><title type='text'>winstl::squeeze_path() redux</title><content type='html'>As of &lt;a href="https://sourceforge.net/project/showfiles.php?group_id=238860&amp;amp;package_id=290378"&gt;1.9.69&lt;/a&gt;, the &lt;a href="http://stlsoft.org/doc-1.9/winstl_2filesystem_2path__functions_8hpp-source.html"&gt;&lt;span style="font-family: courier new;"&gt;winstl::squeeze_path()&lt;/span&gt; function template&lt;/a&gt; is much improved, mainly due to extensive unit-testing. This, in turn, is a fall-out of the the removal of dependencies on so-called "unsafe" string functions, such as &lt;span style="font-family: courier new;"&gt;strncpy()&lt;/span&gt;, &lt;span style="font-family: courier new;"&gt;strcat()&lt;/span&gt;, and so forth. And that, in turn, is due to a "need" to be compatible with Microsoft's perverse designation of standard library functions as deprecated. Ho hum.&lt;br /&gt;&lt;br /&gt;Anyway, the improvements now mean that it's robust for all buffer sizes between [0, strlen(path)] and beyond. So, you can do all of the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;std::string path = "H:\\xyz\\mno\\abcdef.ghi";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;char        buffer&lt;/span&gt;[101];&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;// returns the number required (22)&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, static_cast&lt;char*&gt;(NULL), 0);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;// returns 1; buffer == ""&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 1);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-family: courier new;"&gt;// returns 2; buffer == "a"&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 2);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-family: courier new;"&gt;// returns 5; buffer == "abcd"&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 5);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-family: courier new;"&gt;// returns 6; buffer == "a...i"&lt;/span&gt;&lt;br /&gt;   &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 6);&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;  &lt;span style="font-family: courier new;"&gt;// returns 9; buffer == "ab...ghi"&lt;/span&gt;&lt;br /&gt;    &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 9);&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;   &lt;span style="font-family: courier new;"&gt;// returns 10; buffer == "abc...ghi"&lt;/span&gt;&lt;br /&gt;    &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 10);&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;   &lt;span style="font-family: courier new;"&gt;// returns 11; buffer == "abcdef.ghi"&lt;/span&gt;&lt;br /&gt;     &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 11);&lt;/span&gt;&lt;br /&gt;   &lt;br /&gt;    &lt;span style="font-family: courier new;"&gt;// returns 11; buffer == "abcdef.ghi"&lt;/span&gt;&lt;br /&gt;      &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 12);&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;     &lt;span style="font-family: courier new;"&gt;// returns 11; buffer == "abcdef.ghi"&lt;/span&gt;&lt;br /&gt;      &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 17);&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;     &lt;span style="font-family: courier new;"&gt;// returns 18; buffer == "H:\\...\\abcdef.ghi"&lt;/span&gt;&lt;br /&gt;       &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 18);&lt;/span&gt;&lt;br /&gt;     &lt;br /&gt;      &lt;span style="font-family: courier new;"&gt;// returns 19; buffer == "H:\\x...\\abcdef.ghi"&lt;/span&gt;&lt;br /&gt;        &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 19);&lt;/span&gt;&lt;br /&gt;      &lt;br /&gt;       &lt;span style="font-family: courier new;"&gt;// returns 20; buffer == "H:\\xy...\\abcdef.ghi"&lt;/span&gt;&lt;br /&gt;        &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 20);&lt;/span&gt;&lt;br /&gt;      &lt;br /&gt;       &lt;span style="font-family: courier new;"&gt;// returns 21; buffer == "H:\\xyz...\\abcdef.ghi"&lt;/span&gt;&lt;br /&gt;        &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 21);&lt;/span&gt;&lt;br /&gt;      &lt;br /&gt;       &lt;span style="font-family: courier new;"&gt;// returns 22; buffer == "H:\\xyz\\mno\\abcdef.ghi"&lt;/span&gt;&lt;br /&gt;         &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 22);&lt;/span&gt;&lt;br /&gt;       &lt;br /&gt;        &lt;span style="font-family: courier new;"&gt;// returns 22; buffer == "H:\\xyz\\mno\\abcdef.ghi"&lt;/span&gt;&lt;br /&gt;         &lt;span style="font-family: courier new;"&gt;&lt;span style="font-weight: bold;"&gt;winstl::path_squeeze&lt;/span&gt;(path, buffer, 23);&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-7690906230412480250?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/7690906230412480250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=7690906230412480250' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7690906230412480250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7690906230412480250'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/01/winstlsqueezepath-redux.html' title='winstl::squeeze_path() redux'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-8774053508904889522</id><published>2009-01-02T18:05:00.000-08:00</published><updated>2009-01-21T22:53:54.071-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Templates'/><category scheme='http://www.blogger.com/atom/ns#' term='Boost'/><category scheme='http://www.blogger.com/atom/ns#' term='Extended STL'/><title type='text'>Working with other libraries, part 3: use consistent conventions for member types</title><content type='html'>Ever get confused by the names of member variables/types/functions of C++ class templates?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.boost.org/doc/libs/1_37_0/libs/format/index.html"&gt;Boost.Format&lt;/a&gt;'s &lt;span style="font-family:courier new;"&gt;basic_format&lt;/span&gt; class template defines five public and two private member types, using a mix of four different naming conventions!&lt;br /&gt;&lt;br /&gt;[an extract from boost/format/format_class.hpp]&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;// in namespace &lt;span style="font-weight: bold;"&gt;boost&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;template &amp;lt;class Ch, class Tr, class Alloc&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;class &lt;span style="font-weight: bold;"&gt;basic_format&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;private:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;typedef typename io::CompatTraits&amp;lt;Tr&gt;::compatible_type &lt;span style="font-weight: bold;"&gt;compat_traits&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;typedef io::detail::stream_format_state&amp;lt;Ch, Tr&gt; &lt;span style="font-weight: bold;"&gt;stream_format_state&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;typedef Ch &lt;span style="font-weight: bold;"&gt;CharT&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;typedef std::basic_string&amp;lt;Ch, Tr, Alloc&gt; &lt;span style="font-weight: bold;"&gt;string_type&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;typedef typename string_type::size_type &lt;span style="font-weight: bold;"&gt;size_type&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;typedef io::detail::format_item&amp;lt;Ch, Tr, Alloc&gt; &lt;span style="font-weight: bold;"&gt;format_item_t&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;typedef io::basic_altstringbuf&amp;lt;Ch, Tr, Alloc&gt; &lt;span style="font-weight: bold;"&gt;internal_streambuf_t&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In &lt;a href="http://www.extendedstl.com/"&gt;&lt;span style="font-style: italic;"&gt;Extended STL, volume 1: Collections and Iterators&lt;/span&gt;&lt;/a&gt; I recommend the use of the following  naming convention for member types:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;For public member types that share names with standard components that have the same logical purpose, follow the standard convention and use the standard name. An example would be &lt;span style="font-weight: bold;font-family:courier new;" &gt;iterator&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;For public member types that are not covered by clause 1, use the &lt;span style="font-weight: bold;font-family:courier new;" &gt;_type&lt;/span&gt; suffix. An example would be &lt;span style="font-weight: bold;font-family:courier new;" &gt;char_type&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;For private member types, use the &lt;span style="font-weight: bold;font-family:courier new;" &gt;_type_&lt;/span&gt; suffix. An example would be &lt;span style="font-weight: bold;font-family:courier new;" &gt;compat_traits_type_&lt;/span&gt;.&lt;/li&gt;&lt;/ol&gt; and &lt;ol start="4"&gt;&lt;li&gt;For public API (non-member) types use the &lt;span style="font-weight: bold;font-family:courier new;" &gt;_t&lt;/span&gt; suffix. An example would be &lt;span style="font-weight: bold;font-family:courier new;" &gt;pan_char_t&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;For non-public/implementation API (non-member) types use the &lt;span style="font-weight: bold;font-family:courier new;" &gt;_t_&lt;/span&gt; suffix. An example would be &lt;span style="font-weight: bold;font-family:courier new;" &gt;b64ErrorString_t_&lt;/span&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;I've been using this for many years without a blip. I can read my code, even some years later, and understand what's a type and what isn't and also, importantly, which types are for consumption in the outside world and which are internal to the component. Q.E.D.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-8774053508904889522?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/8774053508904889522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=8774053508904889522' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8774053508904889522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8774053508904889522'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/01/working-with-other-libraries-part-3-use.html' title='Working with other libraries, part 3: use consistent conventions for member types'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1695201047429806015</id><published>2009-01-01T22:08:00.001-08:00</published><updated>2009-01-21T22:35:36.583-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='std::string'/><category scheme='http://www.blogger.com/atom/ns#' term='Allocators'/><category scheme='http://www.blogger.com/atom/ns#' term='Loki.SafeFormat'/><category scheme='http://www.blogger.com/atom/ns#' term='Boost.Format'/><category scheme='http://www.blogger.com/atom/ns#' term='standard library'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>Working with other libraries, part 2: allocators</title><content type='html'>Much is often made of the supposedly still-born &lt;a href="http://www.sgi.com/tech/stl/Allocators.html"&gt;Allocator&lt;/a&gt; concept in the standard library. However, one very good use of them is in tracking memory.&lt;br /&gt;&lt;br /&gt;At the moment I'm preparing some analyses of &lt;a href="http://www.fastformat.org/"&gt;FastFormat&lt;/a&gt;'s performance for an article I'm writing. One of the analyses conducting is to see how many memory allocations are involved in a formatting statement, for each of the comparison libraries. The standard way to achieve something like this is to overload the global operators new, as in:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;// NOTE: this code is only valid for single-threaded operation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;extern int s_nallocs = 0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#ifdef OVERLOAD_OPNEW&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;void* counting_malloc(size_t cb)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;++s_nallocs;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;return ::malloc(cb);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;void counting_free(void* pv)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;::free(pv);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;void* operator new(size_t cb)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;return counting_malloc(cb);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;void operator delete(void* pv)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;counting_free(pv);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;void* operator new[](size_t cb)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;return counting_malloc(cb);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;void operator delete[](void* pv)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;counting_free(pv);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#endif /* OVERLOAD_OPNEW */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately, some components with some compilers - the exact permutations escape me at this point - don't go through operator new. This might be because they use a per-class operator new, or it might be because they use an allocator that doesn't use new. (Being under a publishing deadline, I didn't have the time - nor the inclination, if I'm honest - to find out which it was in each case.)&lt;br /&gt;&lt;br /&gt;So, in order to get a fighting chance at an accurate depiction of how much memory each library is using I decided to force the issue, by requiring all the strings used to be an instance of the following specialisation, rather than &lt;span style="font-family:courier new;"&gt;std::string&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;typedef &lt;span style="font-weight: bold;"&gt;std::basic_string&lt;/span&gt;&amp;lt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;char&lt;br /&gt;,&amp;nbsp;std::char_traits&lt;/span&gt;&amp;lt;char&gt;&lt;br /&gt;,&amp;nbsp;&lt;span style="font-weight: bold;"&gt;stlsoft::new_allocator&lt;/span&gt;&amp;lt;char&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight: bold;"&gt;string_t&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Of course, things aren't ever that simple. Such a string type is not compatible with the &lt;span style="font-weight: bold;"&gt;IOStreams&lt;/span&gt; default specialisations, requiring:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;typedef &lt;span style="font-weight: bold;"&gt;std::basic_stringstream&lt;/span&gt;&amp;lt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;char&lt;br /&gt;,&amp;nbsp;std::char_traits&lt;/span&gt;&amp;lt;char&gt;&lt;br /&gt;,&amp;nbsp;&lt;span style="font-weight: bold;"&gt;stlsoft::new_allocator&lt;/span&gt;&amp;lt;char&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight: bold;"&gt;stringstream_t&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And the same thing applies for &lt;a href="http://www.boost.org/doc/libs/1_36_0/libs/format/index.html"&gt;&lt;span style="font-weight: bold;"&gt;Boost.Format&lt;/span&gt;&lt;/a&gt;, requiring:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;typedef &lt;span style="font-weight: bold;"&gt;boost::basic_format&lt;/span&gt;&amp;lt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;char&lt;br /&gt;,&amp;nbsp;std::char_traits&lt;/span&gt;&amp;lt;char&gt;&lt;br /&gt;,&amp;nbsp;&lt;span style="font-weight: bold;"&gt;stlsoft::new_allocator&lt;/span&gt;&amp;lt;char&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-weight: bold;"&gt;format_t&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately, &lt;a href="http://loki-lib.sourceforge.net/"&gt;Loki&lt;/a&gt;'s &lt;span style="font-weight: bold;"&gt;SafeFormat&lt;/span&gt; library does not allow for the specification of allocators (or character traits, for that matter), and only uses &lt;span style="font-family:courier new;"&gt;std::string&lt;/span&gt;. So a little horrifying trickery was required.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1&lt;/span&gt;: Introduce &lt;span style="font-family:courier new;"&gt;string_t&lt;/span&gt; into the &lt;span style="font-family:courier new;"&gt;std&lt;/span&gt; namespace.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;namespace std&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;using ::string_t;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, if you've been paying attention this last decade or so you'll know that adding to the &lt;span style="font-family:courier new;"&gt;std&lt;/span&gt; namespace is strictly controlled. I won't go over the rules now; you can look it up. Suffice to say that this action is not allowed.&lt;br /&gt;&lt;br /&gt;Of course, needs must, and in this case there's no choice. Since it's just a perf-test program, it's ok. Just don't go using this tactic in production code.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2&lt;/span&gt;: Make Loki (and any other code, for that matter) think that &lt;span style="font-family:courier new;"&gt;std::string_t&lt;/span&gt; is &lt;span style="font-family:courier new;"&gt;std::string&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#define string &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;string_t&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I warned you it was horrid!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3&lt;/span&gt;: #include the Loki.SafeFormat header&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-family:courier new;" &gt;#include &lt;/span&gt;&lt;loki h=""&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;loki/safeformat.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Obviously, this has to be done &lt;span style="font-style: italic;"&gt;after&lt;/span&gt; steps 1 &amp;amp; 2, otherwise it won't work.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There were a few other dodgy things I had to do to get it to work with some &lt;span style="font-style: italic;"&gt;really&lt;/span&gt; stupid compilers, but that'll have to wait until another day.&lt;/loki&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1695201047429806015?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1695201047429806015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1695201047429806015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1695201047429806015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1695201047429806015'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2009/01/working-with-other-libraries-part-2.html' title='Working with other libraries, part 2: allocators'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-8526720976995906795</id><published>2008-12-30T14:08:00.000-08:00</published><updated>2008-12-30T14:09:55.562-08:00</updated><title type='text'>Working with other libraries, part 1: Loki performance testing in FastFormat</title><content type='html'>&lt;a href="http://www.fastformat.org/"&gt;FastFormat&lt;/a&gt;'s performance test programs are available from the command-line, via "&lt;span style="font-family:courier new;"&gt;make -e test.performance&lt;/span&gt;".&lt;br /&gt;&lt;br /&gt;Since &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=177382&amp;amp;package_id=204396#"&gt;0.2.1 alpha 2&lt;/a&gt;, the distribution has included support for testing against &lt;a href="http://www.boost.org/"&gt;Boost&lt;/a&gt;'s &lt;span style="font-weight: bold;"&gt;Boost.Format&lt;/span&gt; library. As long as you have an environment variable &lt;span style="font-family:courier new;"&gt;BOOST&lt;/span&gt; defined - under which the &lt;span style="font-family:courier new;"&gt;boost&lt;/span&gt; directory resides - then the above &lt;span style="font-weight: bold;"&gt;make&lt;/span&gt; command-line will provide you with performance tests including &lt;span style="font-weight: bold;"&gt;Boost.Format&lt;/span&gt;. That's reasonably easy to do, because &lt;span style="font-weight: bold;"&gt;Boost.Format&lt;/span&gt; is header-only.&lt;br /&gt;&lt;br /&gt;With &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=177382&amp;amp;package_id=204396#"&gt;0.2.1 beta 6&lt;/a&gt;, I needed to include &lt;a href="http://www.sourceforge.net/projects/loki-lib"&gt;Loki&lt;/a&gt;'s &lt;span style="font-weight: bold;"&gt;SafeFormat&lt;/span&gt; library. This presented something of a challenge, however, because Loki comes as header+implementation, i.e. it has .cpp files.&lt;br /&gt;&lt;br /&gt;FastFormat, like several other &lt;a href="http://www.stlsoft.org/"&gt;STLSoft&lt;/a&gt;-related, libraries builds an exhaustive set of configurations. For example, with Visual C++ 9, it builds &lt;span style="font-style: italic;"&gt;debug multithreaded&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;debug multithreaded dll&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;release multithreaded&lt;/span&gt;, and &lt;span style="font-style: italic;"&gt;release multithreaded dll&lt;/span&gt;. Loki's distribution includes VC++ project/solution files that only provide the &lt;span style="font-style: italic;"&gt;multithreaded&lt;/span&gt; (not the &lt;span style="font-style: italic;"&gt;multithreaded dll&lt;/span&gt;) configurations. &lt;span style="font-weight: bold;"&gt;Problem&lt;/span&gt;: how to use &lt;span style="font-weight: bold;"&gt;Loki.SafeFormat&lt;/span&gt; if Loki is detected (by presence of &lt;span style="font-family:courier new;"&gt;LOKI&lt;/span&gt; environment variable).&lt;br /&gt;&lt;br /&gt;This problem had me somewhat vexed, so I did what I usually did when I can't think: I went for a ride.&lt;br /&gt;&lt;br /&gt;Upon my return, I hit upon the solution: build a specific &lt;span style="font-weight: bold;"&gt;FastFormat&lt;/span&gt;-specific library containing only the source file for the &lt;span style="font-weight: bold;"&gt;SafeFormat&lt;/span&gt; part of &lt;span style="font-weight: bold;"&gt;Loki&lt;/span&gt;. If the makefile detects the definition of the &lt;span style="font-family:courier new;"&gt;LOKI&lt;/span&gt; variable, it will attempt to build the &lt;span style="font-family:courier new;"&gt;lib/loki.safefmt.ff.???&lt;/span&gt; library (where ??? refers to the &lt;a href="http://blog.stlsoft-musings.net/2008/08/synesis-software-object-library-naming.html"&gt;per-compiler/architecture/mode configuration&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;If that library does not exist, it is linked from a corresponding object, which itself is built from a file &lt;span style="font-family:courier new;"&gt;src/loki.safefmt/loki.safefmt.cpp&lt;/span&gt;. If this file does not exist, it is automatically generated. This file contains exactly one (pre-processor) statement:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#include &amp;lt;../src/SafeFormat.cpp&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;which includes the requisite file form the &lt;span style="font-weight: bold;"&gt;Loki&lt;/span&gt; source directory.&lt;br /&gt;&lt;br /&gt;The reason this is done is to simplify the situation if the &lt;span style="font-weight: bold;"&gt;Loki&lt;/span&gt; source cannot be found. As you will be aware, failing to find a required file in a makefile-build can lead to less-then-clear error messages. By generating the file if it's not there, and by &lt;span style="font-family:courier new;"&gt;#include&lt;/span&gt;-ing the requisite &lt;span style="font-weight: bold;"&gt;Loki&lt;/span&gt; source file (&lt;span style="font-family:courier new;"&gt;SafeFormat.cpp&lt;/span&gt;), it'll be clearer to users if that file is missing, or in the wrong directory. It also seems preferable to distributing a &lt;span style="font-weight: bold;"&gt;Loki&lt;/span&gt;-related source file in the &lt;span style="font-weight: bold;"&gt;FastFormat&lt;/span&gt; distribution, merely to allow for comparative performance testing.&lt;br /&gt;&lt;br /&gt;So, whether you use &lt;span style="font-weight: bold;"&gt;Loki&lt;/span&gt; or not, you can build and test FastFormat without needing any dependencies on it. All you need to include &lt;span style="font-weight: bold;"&gt;Loki.SafeFormat&lt;/span&gt; in the tests is to define the &lt;span style="font-family:courier new;"&gt;LOKI&lt;/span&gt; variable, in the same way as if you wish to include &lt;span style="font-weight: bold;"&gt;Boost.Format&lt;/span&gt; in the tests you define the &lt;span style="font-family:courier new;"&gt;BOOST&lt;/span&gt; variable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-8526720976995906795?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/8526720976995906795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=8526720976995906795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8526720976995906795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8526720976995906795'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/12/working-with-other-libraries-part-1_30.html' title='Working with other libraries, part 1: Loki performance testing in FastFormat'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-4209120057632370878</id><published>2008-12-29T16:22:00.000-08:00</published><updated>2008-12-29T16:24:08.365-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>Width/Alignment/Fill functionality for FastFormat (0.3) functionally complete</title><content type='html'>Work on &lt;a href="http://www.fastformat.org/"&gt;FastFormat&lt;/a&gt; has been progressing substantially over the last few days, in preparation for:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A series of articles to feature in Overload in 09&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.breakingupthemonolith.com/"&gt;Monolith&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;As part of this, the width/alignment/fill functionality has been proven in the (currently unreleased) 0.3 branch, so that minimum-width and/or maximum-width and/or alignment and/or fill may be specified. Let's consider a couple of examples.&lt;br /&gt;&lt;br /&gt;1. Output a string that uses a single argument twice, with default formatting in each case:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ff::fmtln(std::cout, "x={0}; y={0};", "abc");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This prints &lt;span style="font-family:courier new;"&gt;x=abc; y=abc;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Specify a minimum width for the first parameter:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ff::fmtln(std::cout, "x={0}; y={0,10};", "abc");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This prints &lt;span style="font-family:courier new;"&gt;x=abc; y=&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;abc;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Specify a minimum width and right alignment (which is the default) for the first parameter:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ff::fmtln(std::cout, "x={0}; y={0,10,,&gt;};", "abc");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This prints &lt;span style="font-family:courier new;"&gt;x=abc; y=&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;abc;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; 4. Specify a minimum width and left alignment for the first parameter:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ff::fmtln(std::cout, "x={0}; y={0,10,,&lt;};", "abc");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; This prints &lt;span style="font-family:courier new;"&gt;x=abc; y=abc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5. Specify a minimum width and centre alignment for the first parameter:&lt;br /&gt;&lt;br /&gt; &lt;span style="font-family:courier new;"&gt;ff::fmtln(std::cout, "x={0}; y={0,10,,^};", "abc");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  This prints &lt;span style="font-family:courier new;"&gt;x=abc; y=&amp;nbsp;&amp;nbsp;&amp;nbsp;abc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6. Specify a maximum width for the second parameter:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ff::fmtln(std::cout, "x={0}; y={0,,2};", "abc");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This prints &lt;span style="font-family:courier new;"&gt;x=abc; y=bc;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7. Specify a maximum width and left alignment for the second parameter:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ff::fmtln(std::cout, "x={0}; y={0,,2,&lt;};", "abc");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; This prints &lt;span style="font-family:courier new;"&gt;x=abc; y=ab;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The precise semantics of the alignment and fill (not shown above) options may still be changed, but the basis of the parameter syntax (four fields: index, min-width, max-width, alignment-and-fill) seem to work out well.&lt;br /&gt;&lt;br /&gt;And the really great news late last night was that this new functionality has no appreciable cost over 0.2, so FastFormat is still head and shoulders ahead of Boost.Format, Loki.SafeFormat, and the IOStreams in performance (as it also is in robustness, expressiveness and flexibility).&lt;br /&gt;&lt;br /&gt;I've &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=177382&amp;package_id=204396"&gt;released beta 7 of 0.2.1&lt;/a&gt; today, and hope to be releasing an alpha of 0.3 in the next couple of weeks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-4209120057632370878?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/4209120057632370878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=4209120057632370878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4209120057632370878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4209120057632370878'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/12/widthalignmentfill-functionality-for.html' title='Width/Alignment/Fill functionality for FastFormat (0.3) functionally complete'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-7249705108224824967</id><published>2008-12-29T15:53:00.001-08:00</published><updated>2008-12-29T16:20:05.198-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Boost'/><category scheme='http://www.blogger.com/atom/ns#' term='Loki'/><category scheme='http://www.blogger.com/atom/ns#' term='IOStreams'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>FastFormat now performance tested against Loki</title><content type='html'>As of &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=177382&amp;amp;package_id=204396"&gt;0.2.1 beta 6&lt;/a&gt;, &lt;a href="http://www.fastformat.org/"&gt;FastFormat&lt;/a&gt;'s performance test programs now also compare against &lt;a href="http://www.erdani.org/"&gt;Andrei Alexandrescu&lt;/a&gt;'s &lt;a href="http://www.sourceforge.net/projects/loki-lib"&gt;Loki library&lt;/a&gt;'s &lt;span style="font-weight: bold;"&gt;SafeFormat&lt;/span&gt; component. The &lt;a href="http://www.fastformat.org/performance.html"&gt;results&lt;/a&gt; clearly demonstrate FastFormat's performance superiority over this library, as they do over C++'s standard &lt;span style="font-weight: bold;"&gt;IOStreams&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;Boost.Format&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Given the fact that &lt;span style="font-weight: bold;"&gt;FastFormat&lt;/span&gt; is more robust and more flexible than these other libraries, and is highly expressive, I think it's fair to now claim that it is the pre-eminent formatting library for C++. All that remains is to provide the planned width+alignment+fill functionality, and it'll be effectively complete.&lt;br /&gt;&lt;br /&gt;I'll be looking for input/assistance in the new year for packaging and porting. If anyone wants to volunteer, you'll be most welcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-7249705108224824967?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/7249705108224824967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=7249705108224824967' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7249705108224824967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7249705108224824967'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/12/fastformat-now-performance-tested.html' title='FastFormat now performance tested against Loki'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-6494247374571078895</id><published>2008-12-24T14:13:00.000-08:00</published><updated>2008-12-24T14:20:42.367-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STL'/><title type='text'>Merry Christmas ... and a busy New Year</title><content type='html'>Just wanted to wish everyone a Merry Christmas, and a happy, and busy, New Year.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Definites in the coming year:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;publication of &lt;a href="http://www.breakingupthemonolith.com/"&gt;Breaking Up The Monolith&lt;/a&gt;; I've been writing like a crazy thing the last week, and now have Part 2 95+% complete and Part 3 ~33% complete&lt;/li&gt;&lt;li&gt;non-beta release of &lt;a href="http://www.pantheios.org/"&gt;Pantheios&lt;/a&gt; 1.0, followed swiftly by new features&lt;/li&gt;&lt;li&gt;release of &lt;a href="http://www.fastformat.org/"&gt;FastFormat&lt;/a&gt; 0.3, which will allow width/alignment specification in the format strings&lt;/li&gt;&lt;li&gt;release of &lt;a href="http://www.xcover.org/"&gt;xCover&lt;/a&gt;, a code coverage library for C++ (which is already being used in the preparation of STLSoft 1.10)&lt;/li&gt;&lt;li&gt;release of &lt;a href="http://www.stlsoft.org/"&gt;STLSoft&lt;/a&gt; 1.10, which will include new features, and a &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;lot&lt;/span&gt; of tidying up and rationalising of the libraries &lt;/li&gt;&lt;li&gt;a brand new website for &lt;a href="http://wwww.synesis.com.au/"&gt;Synesis Software&lt;/a&gt;, including tutorials and blogs&lt;/li&gt;&lt;li&gt;new articles and columns from me &lt;/li&gt;&lt;/ul&gt;&lt;div&gt;See you then.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Matt&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-6494247374571078895?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/6494247374571078895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=6494247374571078895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/6494247374571078895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/6494247374571078895'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/12/merry-christmas-and-busy-new-year.html' title='Merry Christmas ... and a busy New Year'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-2410852164837235020</id><published>2008-12-13T01:07:00.001-08:00</published><updated>2008-12-13T01:18:24.876-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='recls'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><title type='text'>recls 1.9 alpha process begun</title><content type='html'>I've &lt;span style="font-style: italic;"&gt;finally&lt;/span&gt; got around to enhancing the old stalwart, &lt;a style="font-weight: bold;" href="http://recls.org/"&gt;recls&lt;/a&gt;, which (if you don't know) is a platform-independent file-system recursive-search library.&lt;br /&gt;&lt;br /&gt;So, far, I've finished a source-file renaming process that I started over a year ago, and now I'm having a go at the tracing functionality. This was formerly implemented in terms of &lt;span style="font-family: courier new;"&gt;syslog()&lt;/span&gt; on UNIX and &lt;span style="font-family: courier new;"&gt;OutputDebugString()&lt;/span&gt; on Windows. Now, as may be obvious if you follow &lt;span style="font-weight: bold;"&gt;STLSoft&lt;/span&gt;-related library news, I'm thinking it'll be implemented in terms of &lt;a style="font-weight: bold;" href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The issue here, though, is that there should be no unnecessary coupling between libraries, and I think it would be wrong to couple &lt;span style="font-weight: bold;"&gt;recls&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;Pantheios&lt;/span&gt; just to provide good logging facilities. So the challenge will be to work out a way to allow the two to work together if required, and to not do so if not. Preprocessor options, function pointers, callbacks, and all manner of other ideas are under consideration.&lt;br /&gt;&lt;br /&gt;I'll let you know how it goes. (And you'll be able to see it, as I'm planning to release &lt;span style="font-weight: bold;"&gt;recls&lt;/span&gt; 1.9 alpha 1 as soon as the logging is done.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-2410852164837235020?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/2410852164837235020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=2410852164837235020' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2410852164837235020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2410852164837235020'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/12/recls-19-alpha-process-begun.html' title='recls 1.9 alpha process begun'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-7183124886011173101</id><published>2008-12-12T20:13:00.000-08:00</published><updated>2008-12-13T11:16:18.552-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.10'/><category scheme='http://www.blogger.com/atom/ns#' term='simple_string'/><title type='text'>simple_string evolution</title><content type='html'>I'm finally putting some time into getting &lt;span style="font-family:courier new;"&gt;stlsoft::&lt;/span&gt;(&lt;span style="font-family:courier new;"&gt;basic_&lt;/span&gt;)&lt;span style="font-family:courier new;"&gt;simple_string&lt;/span&gt; finished - it's only been, er, 6 years. :$&lt;br /&gt;&lt;br /&gt;Anyhow, here's the thinking:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Round out all the currently-missing &lt;span style="font-family:courier new;"&gt;std::basic_string&lt;/span&gt; equivalency methods, so that it can act as a full functional replacement&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Define its purpose.  This is something that has confused &lt;a href="http://stlsoft.org/"&gt;STLSoft&lt;/a&gt; users over the years.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Provide compile-time selection of its nature, facilitating user-selected customisations of its implementation&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;The second point can be expressed as two main notions:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It has a documented footprint, equivalent to a single &lt;span style="font-family:courier new;"&gt;char*&lt;/span&gt;, which is consistent across platforms/architectures/operating systems, allowing, for example, a user to pass a &lt;span style="font-family:courier new;"&gt;std::vector&amp;lt;stlsoft::simple_string&amp;gt;&lt;/span&gt; to a function taking an array of C-style strings&lt;/li&gt;&lt;li&gt;It is, in &lt;span style="font-style: italic;"&gt;some&lt;/span&gt; circumstances, more efficient than &lt;span style="font-family:courier new;"&gt;std::basic_string&lt;/span&gt;. Please note that superior efficiency is not a main design feature of the component, nor is it claimed in any general sense.&lt;/li&gt;&lt;/ul&gt;These changes will be included in forthcoming alpha releases of STLSoft 1.10.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-7183124886011173101?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/7183124886011173101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=7183124886011173101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7183124886011173101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7183124886011173101'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/12/simplestring-evolution.html' title='simple_string evolution'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-8384608039746355225</id><published>2008-12-12T20:09:00.001-08:00</published><updated>2008-12-12T20:12:52.241-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xCover'/><category scheme='http://www.blogger.com/atom/ns#' term='recls'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>Radio silence ...</title><content type='html'>Having had a protracted break from STLSoft-related blogging, I'm back.&lt;br /&gt;&lt;br /&gt;I've been busy with clients, and with various coding and writing projects, of which more in the coming posts.&lt;br /&gt;&lt;br /&gt;I'll be &lt;span style="font-style: italic;"&gt;attempting&lt;/span&gt; to post daily for the next few weeks, as I make my way through the following tasks:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://stlsoft.org/"&gt;STLSoft&lt;/a&gt; 1.10 alpha releases&lt;/li&gt;&lt;li&gt;&lt;a href="http://recls.org/"&gt;recls&lt;/a&gt; 1.9 alpha release&lt;/li&gt;&lt;li&gt;&lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt; 0.2 beta releases&lt;/li&gt;&lt;li&gt;&lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt; 1.0 non-beta release&lt;/li&gt;&lt;li&gt;&lt;a href="http://xcover.org/"&gt;xCover&lt;/a&gt; first release&lt;/li&gt;&lt;li&gt;... and other things I've currently forgotten&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-8384608039746355225?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/8384608039746355225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=8384608039746355225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8384608039746355225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8384608039746355225'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/12/radio-silence.html' title='Radio silence ...'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-4673278979210578787</id><published>2008-11-21T14:12:00.000-08:00</published><updated>2008-11-21T14:16:57.364-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.10'/><title type='text'>Using STLSoft 1.10 alpha (delta) releases</title><content type='html'>Just a quick remark on the strategy for STLSoft 1.10. Essentially, the alpha releases will be forthcoming over the next few months, as components are moved over (and given the treatment) from the 1.9 branch, and new components are added. Each of these alpha releases is in the form of a delta-only distribution, meaning that you will have to first install STLSoft 1.9, and then either:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Install the STLSoft 1.10 distribution over the top of the 1.9 installation, or&lt;/li&gt;&lt;li&gt;Install STLSoft 1.10 to a separate area and then use include paths to cause your compiler(s) to see the 1.10 alpha files first&lt;/li&gt;&lt;/ul&gt;We do the latter, by:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Defining an STLSOFT environment variable pointing to the 1.9 distro root directory&lt;/li&gt;&lt;li&gt;Defining an STLSOFT_1_10 environment variable pointing to the 1.10 distro&lt;/li&gt;&lt;li&gt;Specifying the latter before the former to the compiler, as in "&lt;span style="font-style: italic;"&gt;g++ -I$STLSOFT_1_10/include -I$STLSOFT/include my_file.cpp&lt;/span&gt;"&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-4673278979210578787?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/4673278979210578787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=4673278979210578787' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4673278979210578787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4673278979210578787'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/11/using-stlsoft-110-alpha-delta-releases.html' title='Using STLSoft 1.10 alpha (delta) releases'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-2632635751372664792</id><published>2008-11-21T13:50:00.000-08:00</published><updated>2008-11-21T14:27:08.078-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.10'/><category scheme='http://www.blogger.com/atom/ns#' term='parsing'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>STLSoft 1.10 new additions: string_to_integer</title><content type='html'>Having not posted for over a month, there's a lot to catch up on.&lt;br /&gt;&lt;br /&gt;I'm going to start with a series of short missives on the latest additions to STLSoft 1.10. (See &lt;a href="http://blog.stlsoft-musings.net/2008/11/using-stlsoft-110-alpha-delta-releases.html"&gt;this &lt;/a&gt;for how to install/use &lt;a href="https://sourceforge.net/project/showfiles.php?group_id=238860&amp;amp;package_id=294944"&gt;1.10 alpha (delta) releases&lt;/a&gt;.) While I'm catching up with the releases, it's probably not going to go in order, so you'll have to be bear with me.&lt;br /&gt;&lt;br /&gt;I'll start today with the new &lt;span style="font-family: courier new;"&gt;stlsoft::string_to_integer()&lt;/span&gt; functions, defined in the new include file &lt;span style="font-style: italic;"&gt;stlsoft/conversion/string_to_integer.hpp&lt;/span&gt;. These are low-level  string-&gt;number parsing functions. Their raison d'etre is performance - they'll be used in the forthcoming &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt; 0.3 version, for high-speed parsing of replacement parameters - and for this they sacrifice some functionality, as discussed below.&lt;br /&gt;&lt;br /&gt;They look like the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;namespace &lt;span style="font-weight: bold;"&gt;stlsoft&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;int &lt;span style="font-weight: bold;"&gt;string_to_integer&lt;/span&gt;(char const* s, char const** endptr);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;int &lt;span style="font-weight: bold;"&gt;string_to_integer&lt;/span&gt;(wchar_t const* s, wchar_t const** endptr);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;int &lt;span style="font-weight: bold;"&gt;string_to_integer&lt;/span&gt;(char const* s, size_t len, char const** endptr);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;int &lt;span style="font-weight: bold;"&gt;string_to_integer&lt;/span&gt;(wchar_t const* s, size_t len, wchar_t const** endptr);&lt;br /&gt;} // namespace stlsoft&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The functions in the first pair take a (non-NULL) pointer to a (nul-terminated) C-style string, along with an optional (may be NULL) pointer to pointer to C-style string, which will receive the pointer to the character terminating the parsing. In this aspect, these functions ape the functionality of the standard &lt;span style="font-family: courier new;"&gt;strtol()&lt;/span&gt; function. However, where they differ is that they do not accept a radix parameter: currently all conversion is decimal.&lt;br /&gt;&lt;br /&gt;The second pair do not require nul-terminated strings, and instead use a length parameter. This is useful when parsing numbers out of string types that may not be null-terminated. (Again, this is found in &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt;, which is the main driver for the release of these functions.)&lt;br /&gt;&lt;br /&gt;These functions are very new, and will evolve further before STLSoft 1.10 beta. Three changes that are candidates to be introduced are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Supporting different radixes (although for radixes not in [8, 10, 16] it may be that they'd defer to &lt;span style="font-family: courier new;"&gt;strtol()&lt;/span&gt;).&lt;/li&gt;&lt;li&gt;Support for different integer types. In fact, the four concrete functions are implemented in terms of two function templates whose integral type is a template parameter, so the groundwork is all there&lt;/li&gt;&lt;li&gt;Support for truncation testing.&lt;/li&gt;&lt;/ul&gt;I'd like to hear from anyone on these, or other, features.&lt;br /&gt;&lt;br /&gt;I'll do some specific performance tests on the functions at a later time. They've had some exposure as part of a larger performance test of the forthcoming &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt; 0.3's new functionality, and have shown to confer a benefit over &lt;span style="font-family: courier new;"&gt;strtol()&lt;/span&gt; and its siblings.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-2632635751372664792?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/2632635751372664792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=2632635751372664792' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2632635751372664792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2632635751372664792'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/11/stlsoft-110-new-additions.html' title='STLSoft 1.10 new additions: string_to_integer'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-9098299519057586092</id><published>2008-10-18T02:46:00.001-07:00</published><updated>2008-10-18T02:49:07.325-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><title type='text'>Pantheios 1.0 countdown ... what do you want to see?</title><content type='html'>I'm on the home straight with the &lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt; 1.0 final (non-beta) release. I've started a discussion thread on the Pantheios &lt;a href="https://sourceforge.net/forum/forum.php?forum_id=475313"&gt;Open Discussion forum&lt;/a&gt; to garner opinion from current (and future!) users as to what features should make it into 1.0 (and what will have to wait until future versions).&lt;br /&gt;&lt;br /&gt;I'm very happy to hear contributions, so please give me your opinions.&lt;br /&gt;&lt;br /&gt;Thanks&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-9098299519057586092?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/9098299519057586092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=9098299519057586092' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/9098299519057586092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/9098299519057586092'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/10/pantheios-10-countdown-what-do-you-want.html' title='Pantheios 1.0 countdown ... what do you want to see?'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-8433144851475287769</id><published>2008-10-14T02:46:00.000-07:00</published><updated>2008-10-15T19:24:23.199-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>Release early, release often; FastFormat 0.2.1 (alpha 4)</title><content type='html'>The value of the open-source adage to "release early, release often" has shown itself once again, this time with respect to the &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt; library. There are a large number of things to go into this library on its progress from 0.2 onwards, but it's been stuck for a month waiting for me to get my act together. Part of the delay is due to the fact that I let too many changes creep in, which complicates the testing and the formulation of the distribution (incl. just listing the changes).&lt;br /&gt;&lt;br /&gt;So, I've just &lt;a href="https://sourceforge.net/project/showfiles.php?group_id=177382&amp;amp;package_id=204396"&gt;released 0.2.1 (alpha 4)&lt;/a&gt;, which is a sound base for the future releases. It incorporates various minor fixes and adjustments, and a wholesale refactoring of the contract enforcement API. (An analogous refactoring has also been done for &lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt;, and is available in its latest release.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-8433144851475287769?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/8433144851475287769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=8433144851475287769' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8433144851475287769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8433144851475287769'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/10/release-early-release-often-fastformat.html' title='Release early, release often; FastFormat 0.2.1 (alpha 4)'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-8321366377451566114</id><published>2008-10-12T18:49:00.000-07:00</published><updated>2010-01-12T03:10:09.246-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xCover'/><category scheme='http://www.blogger.com/atom/ns#' term='xContract'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft 1.10'/><category scheme='http://www.blogger.com/atom/ns#' term='TR1'/><title type='text'>STLSoft 1.10 coming: Contracts, Coverage, TR1, new components</title><content type='html'>It's been two years in the making, but the STLSoft 1.10 branch is finally about to begin showing its face to the world. There are a number of important new features to be introduced to the libraries, and we've reached the point where the 1.9 branch won't take more new features being stuffed into it.&lt;br /&gt;&lt;br /&gt;Initially, the new branch will be presented as a series of "alpha delta" releases, each of which will rely on the 1.9 branch being visible in the include path (after 1.10, of course, to allow source interpositioning). That's largely because the task of bringing over all the 1.9 components at once is just too daunting.&lt;br /&gt;&lt;br /&gt;So what's going to be new in 1.10? Well, that's a hard question to answer, largely because 1.10 is not likely to come out of alpha until 2009. However, there are some aspects that are already certain to go in:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Improved contract enforcement support, separating out the different aspects of Contract Programming. Users will have the option to use &lt;a href="http://xcontract.org/"&gt;xContract&lt;/a&gt;, the current &lt;span style="font-family: courier new;"&gt;assert()&lt;/span&gt;-based enforcement approach, or any other contract enforcement library they choose. (That xContract is itself implemented in terms of STLSoft confers a little complexity, but this will be handled by the separate compilation of the two libaries: in the compilation of xTests, STLSoft's contracts will be the old &lt;span style="font-family: courier new;"&gt;assert()&lt;/span&gt;-based ones.)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Code coverage. This is in its infancy because the library it will use, &lt;a href="http://xcover.org/"&gt;xCover&lt;/a&gt;, is as yet unreleased&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Properties File library. This will provide full support for the Java Properties file format, with the usual high-performance tweaks (incl. memory mapping and string views)&lt;/li&gt;&lt;li&gt;Reworking of all the per-compiler feature discrimination. Some early hints of how this will work are to be found in msvc.h and gcc.h&lt;/li&gt;&lt;li&gt;TR1 components, to facilitate migration to these new components&lt;br /&gt;&lt;/li&gt;&lt;li&gt;and lots more ... including user-requested functionality, so please &lt;a href="https://sourceforge.net/tracker/?atid=1107749&amp;amp;group_id=238860&amp;amp;func=browse"&gt;get your requests in now&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;If anyone wants to offer help in this marathon effort, you'll be spectacularly welcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-8321366377451566114?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/8321366377451566114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=8321366377451566114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8321366377451566114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8321366377451566114'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/10/stlsoft-110-coming-contracts-coverage.html' title='STLSoft 1.10 coming: Contracts, Coverage, TR1, new components'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-7973152396542645425</id><published>2008-10-08T15:48:00.000-07:00</published><updated>2008-10-08T15:55:44.606-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Type-tunnel'/><category scheme='http://www.blogger.com/atom/ns#' term='shims'/><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><category scheme='http://www.blogger.com/atom/ns#' term='Monolith'/><title type='text'>Busy times; Pantheios.COM release</title><content type='html'>Things are really busy at the moment, what with my current commercial client and doing a fair chunk of the writing commitments that I've been dodging for much of this year.&lt;br /&gt;&lt;br /&gt;I'm committed to writing 8 articles over the next year, about things to do with &lt;a href="http://www.breakingupthemonolith.com/"&gt;Monolith&lt;/a&gt; (&lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt;, &lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt;, &lt;a href="http://www.breakingupthemonolith.com/glossary.html#type-tunnel"&gt;Type-tunneling&lt;/a&gt;, &lt;a href="http://www.breakingupthemonolith.com/glossary.html#shims"&gt;Shims&lt;/a&gt;, and so on).&lt;br /&gt;&lt;br /&gt;But in the meantime things are progressing on the libraries. Today I've released a new version of &lt;a href="https://sourceforge.net/forum/forum.php?forum_id=875068"&gt;Pantheios.COM&lt;/a&gt;, which fixes incompatibility with early-binding automation clients (such as Visual Basic and Delphi).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-7973152396542645425?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/7973152396542645425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=7973152396542645425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7973152396542645425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7973152396542645425'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/10/busy-times-pantheioscom-release.html' title='Busy times; Pantheios.COM release'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-4291557669158620899</id><published>2008-09-30T22:36:00.000-07:00</published><updated>2008-09-30T22:37:50.816-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='SourceForge'/><title type='text'>STLSoft site moved to SourceForge</title><content type='html'>As part of the movement of STLSoft over to SourceForge, I've just put in the DNS  changes. Expect a few hiccups in the next few hours, as the DNS record  updates are rolled out, after which the new site should be  available.&lt;br /&gt;&lt;br /&gt;Please visit the site, &lt;a href="http://stlsoft.org/"&gt;http://stlsoft.org/&lt;/a&gt;, and provide feedback on the  services/content provided there.&lt;br /&gt;&lt;br /&gt;Also, please feel free to make use of  the forums and the trackers. These will be preferred over this newsgroup, or  direct emails, from this point onwards for keeping track of &lt;a href="http://sourceforge.net/tracker/?group_id=238860&amp;amp;atid=1107746"&gt;bugs&lt;/a&gt;, &lt;a href="http://sourceforge.net/tracker/?group_id=238860&amp;amp;atid=1107749"&gt;feature  requests&lt;/a&gt;, &lt;a href="http://sourceforge.net/forum/forum.php?forum_id=864084"&gt;tutorial questions&lt;/a&gt;, and so forth.&lt;br /&gt;&lt;br /&gt;Matt&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-4291557669158620899?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/4291557669158620899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=4291557669158620899' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4291557669158620899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4291557669158620899'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/stlsoft-site-moved-to-sourceforge.html' title='STLSoft site moved to SourceForge'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-234497368788682943</id><published>2008-09-28T05:21:00.000-07:00</published><updated>2008-09-28T05:22:03.602-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xCover'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='xTests'/><title type='text'>New library: xContract 0.3.3 released</title><content type='html'>&lt;b&gt;xContract&lt;/b&gt; is a contract enforcement library for C and C++, written in C.  Its notable features are: &lt;p&gt; &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Phase Separation&lt;/b&gt;. It supports the separation of the three phases of  contract enforcement: &lt;b&gt;detection&lt;/b&gt;, &lt;b&gt;reporting&lt;/b&gt; and &lt;b&gt;response&lt;/b&gt;.  &lt;b&gt;Detection&lt;/b&gt; is achieved by simple boolean condition evaluation.  &lt;b&gt;Reporting&lt;/b&gt; is achieved via a callback function, either the stock &lt;span style="font-family:courier new;"&gt;xContract_violationReport()&lt;/span&gt; function, or one supplied by the user. &lt;b&gt;Response&lt;/b&gt; is to terminate the  process. &lt;/li&gt;&lt;li&gt;&lt;b&gt;The &lt;a href="http://synesis.com.au/publishing/monolith/glossary.html#principle-of-irrecoverability"&gt;&lt;em&gt;Principle  of Irrecoverability&lt;/em&gt;&lt;/a&gt;&lt;/b&gt;. If the &lt;b&gt;reporting&lt;/b&gt; receiver does not  cause the process to terminate, then the library will always do so. &lt;/li&gt;&lt;li&gt;&lt;b&gt;The &lt;a href="http://synesis.com.au/publishing/monolith/glossary.html#principle-of-removability"&gt;&lt;em&gt;Principle  of Removability&lt;/em&gt;&lt;/a&gt;&lt;/b&gt;. Enforcements may be enabled/disabled either at  compile-time or at runtime according to the choices of the programmer &lt;/li&gt;&lt;li&gt;&lt;b&gt;Portability&lt;/b&gt;. It relies on no platform-specific or compiler-specific constructs. The only library it relies on is the 100% header-only, open-source &lt;a href="http://www.stlsoft.org/"&gt;STLSoft&lt;/a&gt; library. It works with a large  number of C/C++ compilers.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;b&gt;xContract&lt;/b&gt; is the second of a triumvirate of C/C++ &lt;b&gt;software quality  assurance&lt;/b&gt; libraries provided by &lt;a href="http://synesis.com.au/"&gt;Synesis  Software&lt;/a&gt;. The first library, &lt;a href="http://xtests.org/"&gt;&lt;b&gt;xTests&lt;/b&gt;&lt;/a&gt;,  is an automated testing library. The third, as yet unreleased, library, &lt;a href="http://xcover.org/"&gt;&lt;b&gt;xCover&lt;/b&gt;&lt;/a&gt;, is an automated code coverage  library.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-234497368788682943?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/234497368788682943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=234497368788682943' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/234497368788682943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/234497368788682943'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/new-library-xcontract-033-released.html' title='New library: xContract 0.3.3 released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-5449415686071504987</id><published>2008-09-27T21:07:00.001-07:00</published><updated>2008-09-27T21:07:48.163-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='build systems'/><category scheme='http://www.blogger.com/atom/ns#' term='dependent libraries'/><category scheme='http://www.blogger.com/atom/ns#' term='makefiles'/><title type='text'>makefiles and build directories</title><content type='html'>Further to &lt;a href="http://stlsoft-musings.blogspot.com/2008/08/synesis-software-object-library-naming.html"&gt;a recent blog post&lt;/a&gt;, about object library naming conventions, there's also some debate about the makefile naming and build directory structure. Historically, there have been three main forms of build-dir+makefile-naming with most &lt;a href="http://stlsoft.wiki.sourceforge.net/Dependent+Projects"&gt;STLSoft-dependent libraries&lt;/a&gt;:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;solo&lt;/span&gt;: e.g. the &lt;span style="font-family:courier new;"&gt;bc584&lt;/span&gt; directory (for Borland C/C++ 5.84) contained the single makefile &lt;span style="font-family:courier new;"&gt;makefile&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;multi-os&lt;/span&gt;, e.g. the &lt;span style="font-family:courier new;"&gt;gcc34&lt;/span&gt; directory (for GCC 3.4) contained the makefiles &lt;span style="font-family:courier new;"&gt;makefile.unix&lt;/span&gt; (for UNIX) and &lt;span style="font-family:courier new;"&gt;makefile.win32&lt;/span&gt; (for Windows)&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;multi-arch&lt;/span&gt;, e.g. the &lt;span style="font-family:courier new;"&gt;vc8_x64&lt;/span&gt; directory (for Visual C++ 8 (x64)) contained the makefile &lt;span style="font-family:courier new;"&gt;makefile&lt;/span&gt; (for 64-bit Windows)&lt;/li&gt;&lt;/ol&gt;Obviously, there's a degree of inconsistency there. Furthermore, using the &lt;span style="font-weight: bold;"&gt;multi-os&lt;/span&gt; form was a pain because it meant having to explictly write '&lt;span style="font-family:courier new;"&gt;make -f makefile.unix&lt;/span&gt;' (or equivalent), rather than just &lt;span style="font-family:courier new;"&gt;make&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;This has all changed now, and all projects will eventually adopt the new form, which is:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;solo&lt;/span&gt;: e.g. the &lt;span style="font-family:courier new;"&gt;bc584&lt;/span&gt; directory contains the single makefile &lt;span style="font-family:courier new;"&gt;makefile&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;multi-os&lt;/span&gt;, e.g. the &lt;span style="font-family:courier new;"&gt;gcc34.unix&lt;/span&gt; directory contains the makefile &lt;span style="font-family:courier new;"&gt;makefile&lt;/span&gt;, and the &lt;span style="font-family:courier new;"&gt;gcc34.win32&lt;/span&gt; contains the makefile &lt;span style="font-family:courier new;"&gt;makefile&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;multi-arch&lt;/span&gt;, e.g. the &lt;span style="font-family:courier new;"&gt;vc8.x64&lt;/span&gt; directory contains the makefile &lt;span style="font-family:courier new;"&gt;makefile&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-5449415686071504987?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/5449415686071504987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=5449415686071504987' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5449415686071504987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5449415686071504987'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/makefiles-and-build-directories.html' title='makefiles and build directories'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-5222812493543965568</id><published>2008-09-26T00:11:00.000-07:00</published><updated>2008-09-26T18:42:39.906-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xCover'/><category scheme='http://www.blogger.com/atom/ns#' term='xContract'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>New Libraries coming ...</title><content type='html'>Commercial and publishing reasons are forcing me to do what I should have done a *long* time ago, and release several pending libraries in the coming days:&lt;br /&gt;* &lt;a href="http://xcontract.org/"&gt;xContract&lt;/a&gt; - a contract programming enforcement library; initially for C/C++&lt;br /&gt;* &lt;a href="http://xcover.org/"&gt;xCover&lt;/a&gt; - a code coverage library for C and C++&lt;br /&gt;* &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt; - already available as an alpha, this will hit the non-alpha/non-beta status in the coming days; as the name implies, it's &lt;a href="http://www.fastformat.org/performance.html"&gt;faster&lt;/a&gt; than all the competition put together ;-)&lt;br /&gt;* &lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt; - in beta (and very &lt;a href="http://sourceforge.net/project/stats/?group_id=141831&amp;amp;ugn=pantheios"&gt;popular&lt;/a&gt;) for two years, the world's &lt;a href="http://pantheios.org/performance.html#sweet-spot"&gt;fastest&lt;/a&gt; and most robust logging API library has waited long enough for a final 1.0 release.&lt;br /&gt;&lt;br /&gt;Also, &lt;a href="http://stlsoft.org/"&gt;STLSoft&lt;/a&gt; is going to be moving to SourceForge in the next week or so, and it too will receive a face lift and an update to docs, tests, and so on.&lt;br /&gt;&lt;br /&gt;If anyone wants to volunteer any help for any of these activities, you'd be extraordinarily welcome.&lt;br /&gt;&lt;br /&gt;Cheers&lt;br /&gt;&lt;br /&gt;Matt&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-5222812493543965568?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/5222812493543965568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=5222812493543965568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5222812493543965568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5222812493543965568'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/new-libraries-coming.html' title='New Libraries coming ...'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-8105043198944333061</id><published>2008-09-25T23:55:00.001-07:00</published><updated>2008-09-28T05:20:55.020-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xContract'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><title type='text'>xContract released</title><content type='html'>&lt;b&gt;xContract&lt;/b&gt; is a contract enforcement library for C and C++, written in C.  Its notable features are: &lt;p&gt; &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Phase Separation&lt;/b&gt;. It supports the separation of the three phases of  contract enforcement: &lt;b&gt;detection&lt;/b&gt;, &lt;b&gt;reporting&lt;/b&gt; and &lt;b&gt;response&lt;/b&gt;.  &lt;b&gt;Detection&lt;/b&gt; is achieved by simple boolean condition evaluation.  &lt;b&gt;Reporting&lt;/b&gt; is achieved via a callback function, either the stock &lt;span style="font-family: courier new;"&gt;xContract_violationReport()&lt;/span&gt; &lt;a class="el" title="Stock reporting function, invoked when a custom function is not specified." href="http://www.blogger.com/group__group____api__core.html#gaec242ec659433092989d79c5a82ac59"&gt;&lt;/a&gt;function, or one supplied by the user. &lt;b&gt;Response&lt;/b&gt; is to terminate the  process. &lt;/li&gt;&lt;li&gt;&lt;b&gt;The &lt;a href="http://synesis.com.au/publishing/monolith/glossary.html#principle-of-irrecoverability"&gt;&lt;em&gt;Principle  of Irrecoverability&lt;/em&gt;&lt;/a&gt;&lt;/b&gt;. If the &lt;b&gt;reporting&lt;/b&gt; receiver does not  cause the process to terminate, then the library will always do so. &lt;/li&gt;&lt;li&gt;&lt;b&gt;The &lt;a href="http://synesis.com.au/publishing/monolith/glossary.html#principle-of-removability"&gt;&lt;em&gt;Principle  of Removability&lt;/em&gt;&lt;/a&gt;&lt;/b&gt;. Enforcements may be enabled/disabled either at  compile-time or at runtime according to the choices of the programmer &lt;/li&gt;&lt;li&gt;&lt;b&gt;Portability&lt;/b&gt;. It relies on no platform-specific or compiler-specific  constructs. The only library it relies on is the 100% header-only, open-source  &lt;a href="http://www.stlsoft.org/"&gt;STLSoft&lt;/a&gt; library. It works with a large  number of C/C++ compilers.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;b&gt;xContract&lt;/b&gt; is the second of a triumvirate of C/C++ &lt;b&gt;software quality  assurance&lt;/b&gt; libraries provided by &lt;a href="http://synesis.com.au/"&gt;Synesis  Software&lt;/a&gt;. The first library, &lt;a href="http://xtests.org/"&gt;&lt;b&gt;xTests&lt;/b&gt;&lt;/a&gt;,  is an automated testing library. The third, as yet unreleased, library, &lt;a href="http://xcover.org/"&gt;&lt;b&gt;xCover&lt;/b&gt;&lt;/a&gt;, is an automated code coverage  library.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-8105043198944333061?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/8105043198944333061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=8105043198944333061' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8105043198944333061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8105043198944333061'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/xcontract-released.html' title='xContract released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-8098488442297921637</id><published>2008-09-22T23:48:00.000-07:00</published><updated>2008-09-27T00:52:20.146-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='SourceForge'/><title type='text'>STLSoft moving to SourceForge</title><content type='html'>I've finally got myself together, and am moving &lt;a href="http://stlsoft.org/"&gt;STLSoft&lt;/a&gt; from the &lt;a href="http://synesis.com.au/"&gt;Synesis Software&lt;/a&gt; site to &lt;a href="http://sourceforge.net/"&gt;SourceForge&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Over the coming months you can expect to see the following changes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The distributions available solely from SF&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The &lt;a href="http://stlsoft.org/"&gt;stlsoft.org&lt;/a&gt; domain will be hosted on SF&lt;/li&gt;&lt;li&gt;A wiki will be configured and built up&lt;/li&gt;&lt;li&gt;Subversion repository (but not  before 1.10 is released, and a whole lot of TODOs are TODONE)&lt;/li&gt;&lt;li&gt;Blogs will be added&lt;/li&gt;&lt;li&gt;Forums will be added&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-8098488442297921637?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/8098488442297921637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=8098488442297921637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8098488442297921637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8098488442297921637'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/stlsoft-moving-to-sourceforge.html' title='STLSoft moving to SourceForge'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-2243593987300093428</id><published>2008-09-22T23:30:00.000-07:00</published><updated>2008-09-22T23:31:58.338-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='domain'/><title type='text'>Moving blog to its own domain</title><content type='html'>Exactly what's said on the tin: I'm moving the blog to &lt;a href="http://stlsoft-musings.net/"&gt;http://stlsoft-musings.net/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It might take a day or so to make it through DNS, but after that it should be sweet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-2243593987300093428?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/2243593987300093428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=2243593987300093428' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2243593987300093428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2243593987300093428'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/moving-blog-to-its-own-domain.html' title='Moving blog to its own domain'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1256742000722991115</id><published>2008-09-15T13:29:00.000-07:00</published><updated>2008-09-15T23:30:26.787-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='dl_call'/><category scheme='http://www.blogger.com/atom/ns#' term='WinSTL'/><title type='text'>Defect in STLSoft's Windows Registry Library on 64-bit</title><content type='html'>One of &lt;a href="http://stlsoft.org/"&gt;STLSoft&lt;/a&gt;'s users is reporting weird behaviour in the &lt;a href="http://stlsoft.org/doc-1.9/group__group____library____windows__registry.html"&gt;Windows Registry Library&lt;/a&gt;, when used on 64-bit Windows (x64).&lt;br /&gt;&lt;br /&gt;It looks like the call to &lt;span style="font-family:courier new;"&gt;winstl::dl_call&lt;/span&gt; is defective, since x64 does not support different calling conventions.&lt;br /&gt;&lt;br /&gt;I must confess I'd overlooked this potential issue - in part because I've still not got around to fully implementing the STLSoft internal automated testing harness - but I would still assume that the code would work, because the calling convention information, if any, would simply be ignored.&lt;br /&gt;&lt;br /&gt;We're still looking into it. I'll post more when I know more ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1256742000722991115?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1256742000722991115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1256742000722991115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1256742000722991115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1256742000722991115'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/defect-in-stlsofts-windows-registry.html' title='Defect in STLSoft&apos;s Windows Registry Library on 64-bit'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-926550070052260696</id><published>2008-09-15T13:24:00.000-07:00</published><updated>2008-09-15T13:28:01.114-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VOLE'/><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>VOLE 0.6.1 broken by bad STLSoft 1.9.53 - 1.9.54 now released</title><content type='html'>A &lt;a href="http://vole.sourceforge.net/"&gt;VOLE&lt;/a&gt; user reported problems with compiling VOLE 0.6.1, which are a result of (i) my having released an incomplete &lt;a href="http://stlsoft.org/"&gt;STLSoft&lt;/a&gt; 1.9.53, and (ii) when using GCC, which does not define UDATE, some of WinSTL's conversion shims - specifically &lt;span style="font-family: courier new;"&gt;to_FILETIME(DATE const&amp;amp;)&lt;/span&gt; and &lt;span style="font-family: courier new;"&gt;to_SYSTEMTIME(DATE const&amp;amp;)&lt;/span&gt; - were not available.&lt;br /&gt;&lt;br /&gt;Both issues are now fixed, with the &lt;a href="http://stlsoft.org/downloads.html"&gt;recently released&lt;/a&gt; STLSoft 1.9.54.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-926550070052260696?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/926550070052260696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=926550070052260696' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/926550070052260696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/926550070052260696'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/vole-061-broken-by-bad-stlsoft-1953.html' title='VOLE 0.6.1 broken by bad STLSoft 1.9.53 - 1.9.54 now released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-4518475948034135392</id><published>2008-09-12T00:31:00.000-07:00</published><updated>2008-09-12T00:36:37.179-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VOLE'/><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>VOLE 0.6.1 released</title><content type='html'>&lt;a href="http://vole.sourceforge.net/"&gt;VOLE&lt;/a&gt; version 0.6.1 is &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=185401"&gt;released&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It now supports time return values, of types &lt;span style="font-family:courier new;"&gt;DATE&lt;/span&gt; (via the VOLE type &lt;span style="font-family:courier new;"&gt;date_t&lt;/span&gt;), &lt;span style="font-family:courier new;"&gt;FILETIME&lt;/span&gt;, and &lt;span style="font-family:courier new;"&gt;SYSTEMTIME&lt;/span&gt;, as in:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;vole::object obj = ...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SYSTEMTIME updated = obj.get_property&lt;systemtime&gt;&amp;lt;SYSTEMTIME&gt;(L"Updated");&lt;/systemtime&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-4518475948034135392?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/4518475948034135392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=4518475948034135392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4518475948034135392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4518475948034135392'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/vole-061-released.html' title='VOLE 0.6.1 released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1410741666586041043</id><published>2008-09-11T22:45:00.000-07:00</published><updated>2008-09-11T22:47:17.682-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>FastFormat 0.2.1 (alpha 3) released</title><content type='html'>&lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt; 0.2.1 (alpha 3) is &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=177382&amp;amp;package_id=204396"&gt;released&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It contains a fix to a defect in the implicit link header, and also a lot of groundwork for widestring support in the near future. (Actually, all the widestring support is now in the core library - just the makefiles, examples and tests need to be correspondingly updated.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1410741666586041043?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1410741666586041043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1410741666586041043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1410741666586041043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1410741666586041043'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/fastformat-021-alpha-3-released.html' title='FastFormat 0.2.1 (alpha 3) released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-2804519500053035663</id><published>2008-09-11T22:40:00.000-07:00</published><updated>2008-09-11T22:44:28.039-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><title type='text'>Pantheios 1.0.1 (beta 156) released</title><content type='html'>&lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt; 1.0.1 beta 156 of is &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=141831&amp;amp;package_id=155759"&gt;released&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It contains a revised naming convention for makefiles, such that every makefile is now in its&lt;br /&gt;&lt;pre&gt;   own directory, and is called 'makefile'. The following examples&lt;br /&gt;  illustrate:&lt;br /&gt;     build/vc9/makefile            =&gt;  build/vc9/makefile&lt;br /&gt;     build/vc9_x64/makefile        =&gt;  build/vc9.x64/makefile&lt;br /&gt;     build/gcc34/makefile.win32    =&gt;  build/gcc34.win32/makefile&lt;br /&gt;     build/gcc34/makefile.unix     =&gt;  build/gcc34.unix/makefile&lt;br /&gt;     build/gcc41/makefile.unix     =&gt;  build/gcc41.unix/makefile&lt;br /&gt;     etc.&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-2804519500053035663?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/2804519500053035663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=2804519500053035663' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2804519500053035663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2804519500053035663'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/pantheios-101-beta-156-released.html' title='Pantheios 1.0.1 (beta 156) released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-2129457940310035365</id><published>2008-09-10T16:55:00.000-07:00</published><updated>2008-09-10T16:57:56.820-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><category scheme='http://www.blogger.com/atom/ns#' term='article'/><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><title type='text'>Pantheios release, and new CodeProject article</title><content type='html'>&lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt; 1.0.1 (beta 155)  is &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=141831&amp;amp;package_id=155759"&gt;released&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Also, a new &lt;a href="http://www.codeproject.com/KB/trace/PantheiosBackendIntro.aspx"&gt;article on Pantheios' Back-end Architecture is published&lt;/a&gt; on &lt;a href="http://codeproject.com/"&gt;CodeProject&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-2129457940310035365?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/2129457940310035365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=2129457940310035365' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2129457940310035365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2129457940310035365'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/pantheios-release-and-new-codeproject.html' title='Pantheios release, and new CodeProject article'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1290625965030543302</id><published>2008-09-10T15:35:00.001-07:00</published><updated>2008-09-10T15:36:26.139-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>STLSoft 1.9.52 released</title><content type='html'>Just a defect-fix &lt;a href="http://stlsoft.org/downloads.html#stlsoft_1_9_52"&gt;release&lt;/a&gt;, to fixup some compiler warnings encountered on Win-64 compilation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1290625965030543302?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1290625965030543302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1290625965030543302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1290625965030543302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1290625965030543302'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/stlsoft-1952-released.html' title='STLSoft 1.9.52 released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-4295692241225849988</id><published>2008-09-10T01:26:00.000-07:00</published><updated>2008-09-10T01:33:47.768-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='Boost'/><category scheme='http://www.blogger.com/atom/ns#' term='IOStreams'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>FastFormat is FAST: It's official!</title><content type='html'>I just posted some performance stats on the &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt; website. I'll just give you the summary here:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The &lt;b&gt;Format API&lt;/b&gt; is faster than &lt;span style="font-weight: bold;"&gt;IOStreams&lt;/span&gt; by between          ~140-730%, faster than MFC's &lt;code&gt;CString::Format()&lt;/code&gt; by          between ~300-400%, and faster than &lt;span style="font-weight: bold;"&gt;Boost.Format&lt;/span&gt; by between          ~470-1600%! The only formatting API that gives it a run for          some architecture/compiler/configurations is          &lt;code&gt;sprintf()&lt;/code&gt;, which is not type-safe, at between ~40-380%. (FastFormat's &lt;b&gt;Format API&lt;/b&gt; is 100% type-safe.)         &lt;/li&gt;&lt;li&gt;          The simpler &lt;b&gt;Write API&lt;/b&gt; is faster than &lt;span style="font-weight: bold;"&gt;IOStreams&lt;/span&gt; by between          ~270-1350%, faster than MFC's &lt;code&gt;CString::Format()&lt;/code&gt; by          around ~420%, and faster than &lt;span style="font-weight: bold;"&gt;Boost.Format&lt;/span&gt; by between          ~630-1800%! Again, the only formatting API that gives it a run for          some architecture/compiler/configurations is          &lt;code&gt;sprintf()&lt;/code&gt;, at between ~65-390%. (FastFormat's &lt;b&gt;Write API&lt;/b&gt;          is 100% type-safe.)         &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-4295692241225849988?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/4295692241225849988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=4295692241225849988' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4295692241225849988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4295692241225849988'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/fastformat-is-fast-its-official.html' title='FastFormat is FAST: It&apos;s official!'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-385875705281664554</id><published>2008-09-06T23:45:00.000-07:00</published><updated>2008-09-07T00:13:50.937-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='shims'/><category scheme='http://www.blogger.com/atom/ns#' term='release'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>STLSoft 1.9.51 released</title><content type='html'>This &lt;a href="http://stlsoft.org/downloads.html#latest"&gt;latest release&lt;/a&gt; contains only two changes, but they're interesting nonetheless.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;first&lt;/span&gt; is a workaround for a defect in VC6. This was found in stlsoft::conversion_error, and comes about as follows. stlsoft::conversion_error is defined along the lines of:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;class conversion_error_base&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;:&amp;nbsp;public std::runtime_error&lt;br/&gt;&lt;br /&gt;{&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;. . .&lt;br/&gt;&lt;br /&gt;public: // Construction&lt;br/&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 0, 0);"&gt;&amp;nbsp;&amp;nbsp;virtual ~conversion_error_base() = 0;&lt;/span&gt;&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;. . .&lt;br/&gt;&lt;br /&gt;};&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;class conversion_error&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;:&amp;nbsp;public conversion_error_base&lt;br/&gt;&lt;br /&gt;{&lt;br/&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;. . .&lt;br/&gt;&lt;br /&gt; };&lt;br/&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The highlighted line is the problem for VC++ 6. The code it generates is defective such that when an instance of any derived class is thrown, the exception does not get thrown, merely hangs about in the current scope, and the program execution carries on as if no exception was thrown.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;second&lt;/span&gt; change is a correction for a defect in the &lt;a href="http://stlsoft.org/doc-1.9/group__group____concept____shim____string__access.html"&gt;string access shim&lt;/a&gt; functions for the SYSTEMTIME type, whereby conversion of an invalid time resulted in a fault, because the calculation for the total length of the resultant string did not take account the fact that the Windows Time API functions returns 0 if the time instance is invalid. The consequence of fixing this defect has resulted in some nice refactoring, so there's some silver lining.&lt;br /&gt;&lt;br /&gt;Coming soon: releases of &lt;a href="http://vole.sourceforge.net/"&gt;VOLE&lt;/a&gt;, &lt;a href="http://flecxx.org/"&gt;flecxx&lt;/a&gt;, &lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt;, and &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-385875705281664554?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/385875705281664554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=385875705281664554' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/385875705281664554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/385875705281664554'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/stlsoft-1951-released.html' title='STLSoft 1.9.51 released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1101548059476955781</id><published>2008-09-03T04:49:00.000-07:00</published><updated>2008-09-03T04:52:52.847-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='release'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>FastFormat is unleashed: v0.2.1 (alpha 1) released</title><content type='html'>&lt;span style="font-family:Tahoma,Sans-Serif;"&gt;&lt;span style="font-family:Tahoma,Sans-Serif;"&gt;&lt;span style=""&gt; FastFormat is an Open Source C/C++ Output/Formatting library, whose design parameters are 100% type-safety, efficiency, genericity and extensibility. It is simple to use and extend, highly-portable (platform and compiler-independent) and, best of all, it upholds the C tradition of you only pay for what you use.&lt;br /&gt;&lt;br /&gt;FastFormat supports output/formatting of statements of arbitrary complexity, consisting of heterogeneous types.&lt;br /&gt;&lt;br /&gt;FastFormat writes to output "sinks", which can be of arbitrary type. It implicitly supports any type that is structurally conformant with the standard library's string, and the library includes adaptors to allow writing to std::ostream, FILE*, speech (currently Windows-only), STLSoft's auto_buffer, C-style string buffers, and character buffers. Adaptation to a new type merely requires the definition of a single function.&lt;br /&gt;&lt;br /&gt;FastFormat is fast. The processing of each statement involves at most one memory allocation to hold the entire statement, and each statement element is measured and copied exactly once. As a consequence, the library is on a par with (the type-unsafe) C's Streams (printf()-family) of functions, faster than C++'s IOStreams, and considerably faster than Boost.Format. Comprehensive performance analyses are underway; initial results of a realistic scenario on Windows (32-bit) with Visual C++ 9 shows FastFormat is approximately 3 x faster than C's Streams, 6 x faster than C++'s IOStreams, and 17 x faster than Boost.Format.&lt;br /&gt;&lt;br /&gt;FastFormat supports I18N/L10N by using numbered arguments, enabling reordering of arguments by exchanging format strings. The library comes with a number of resource bundles, classes whose instances can load sets of localised resource strings for use as format strings.&lt;br /&gt;&lt;br /&gt;FastFormat does not contain any compiler-specific or platform-specific constructs. It supports UNIX (including Linux and Mac OS-X), and Windows, and should work with any operating system. It is known to be compatible with Comeau (4.3.3+), GCC (3.4+), Intel (8+), Metrowerks (8+), Microsoft Visual C++ (6.0+), and should work with any reasonably modern C++ compiler.&lt;br /&gt;&lt;br /&gt;FastFormat is completely free and includes source released under a BSD-style license. Commercial customisations and related consultancy are provided by Synesis Software Pty Ltd; &lt;a href="http://synesis.com.au/contact.html%29"&gt;http://synesis.com.au/contact.html)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Release 0.2.1 alpha 1 is the first public release.&lt;br /&gt;&lt;br /&gt;Note: this release of FastFormat requires STLSoft 1.9.50, or later. Download from &lt;a href="http://stlsoft.org/"&gt;http://stlsoft.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Download from: &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=177382&amp;amp;package_id=204396"&gt;http://sourceforge.net/project/showfiles.php?group_id=177382&amp;amp;package_id=204396&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Discuss at: &lt;a href="http://sourceforge.net/forum/forum.php?forum_id=612781"&gt;http://sourceforge.net/forum/forum.php?forum_id=612781&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;FastFormat website: &lt;a href="http://fastformat.org/"&gt;http://fastformat.org/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1101548059476955781?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1101548059476955781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1101548059476955781' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1101548059476955781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1101548059476955781'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/fastformat-is-unleashed-v021-alpha-1.html' title='FastFormat is unleashed: v0.2.1 (alpha 1) released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-6192036733890579165</id><published>2008-09-02T00:10:00.000-07:00</published><updated>2008-09-02T00:18:39.371-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='inserter'/><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><title type='text'>When good compilers go BAD! A sorry tale of unhelpfulness from GCC</title><content type='html'>I've just added a new inserter class, w2m, to the &lt;a href="http://sourceforge.org/performance.html#sweet-spot"&gt;world's fastest logging API library&lt;/a&gt;, &lt;a style="font-weight: bold;" href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt;, in leiu of the widestring support that'll come in version 1.1+.&lt;br /&gt;&lt;br /&gt;The initial implementation of the class uses STLSoft's &lt;a href="http://stlsoft.org/doc-1.9/classstlsoft_1_1auto__buffer.html"&gt;auto_buffer&lt;/a&gt;, to be especially efficient in the case where the length of the string to be converted falls below a threshold - 64 in this case.&lt;br /&gt;&lt;br /&gt;As with all other inserter classes, it does not provide copy semantics, neither copy constructor nor copy assignment operator.&lt;br /&gt;&lt;br /&gt;All is well until I try to compile with GCC, which "helpfully" informs me that it can't generate a copy-constructor. (auto_buffer does not define a copy-constructor by design; you can read about why in section 16.2.3 of &lt;a href="http://extendedstl.com/"&gt;&lt;span style="font-style: italic;"&gt;Extended STL, volume 1&lt;/span&gt;&lt;/a&gt;. Somewhat surprising that, given that I'd expressly told it not to try, by declaring, but not defining said copy constructor.&lt;br /&gt;&lt;br /&gt;So, I've now got to spend a couple of hours implementing some custom memory management code to ensure portability. Great!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-6192036733890579165?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/6192036733890579165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=6192036733890579165' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/6192036733890579165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/6192036733890579165'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/when-good-compilers-go-bad-sorry-tale.html' title='When good compilers go BAD! A sorry tale of unhelpfulness from GCC'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-4650403743612823454</id><published>2008-09-01T23:44:00.000-07:00</published><updated>2008-09-01T23:51:29.247-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='release'/><category scheme='http://www.blogger.com/atom/ns#' term='libraries'/><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>FastFormat about to drop ... and it's FAST!</title><content type='html'>I'm now less than two days away from releasing &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt;. All that's left to do is:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;verify on 64-bit Linux&lt;/li&gt;&lt;li&gt;do the docs (a basic first cut; nothing mega good)&lt;/li&gt;&lt;li&gt;try and find out why DMC++ does not like it (as usual, it's the odd-man-out with templates)&lt;/li&gt;&lt;li&gt;do a decently comprehensive lot of performance tests&lt;/li&gt;&lt;/ul&gt;As a first go at verifying the performance, I've run a test which formats thusly:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    std::string                                        arg0    =   "abc";&lt;/span&gt;&lt;br/&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    const char                                        arg1[]  =   "def";&lt;/span&gt;&lt;br/&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    stlsoft::simple_string                            arg2    =   "ABCDEFGHIJKLMNOPQRSTUVWXYZ";&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &lt;span style="font-weight: bold;"&gt;fastformat::fmt&lt;/span&gt;(s, "The first param '{0}', and the second '{1}', and the first again '{0}'. Finally the third '{2}'", arg0, arg1, arg2);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: this is for &lt;span style="font-style: italic;"&gt;one&lt;/span&gt; compiler (VC++ 9), and &lt;span style="font-style: italic;"&gt;one&lt;/span&gt; scenario (described above), so we can't draw any way-out conclusions as yet. But the first results are pretty encouraging to say the least:&lt;br /&gt;&lt;br /&gt;IOStreams:  679561us&lt;br /&gt;Boost.Format: 1901109us&lt;br /&gt;sprintf():  346776us&lt;br /&gt;FastFormat: 112016us&lt;br /&gt;IOStreams:FastFormat:           6.067&lt;br /&gt;Boost.Format:FastFormat:        16.97&lt;br /&gt;sprintf:FastFormat():           3.096&lt;br /&gt;&lt;br /&gt;These numbers mean that, for that scenario with that compiler, FastFormat is 3x faster than sprintf, 6x faster than the IOStreams, and 17x than Boost.Format.&lt;br /&gt;&lt;br /&gt;Given that it's 100% type-safe, infinitely extensible, and supports I18N/L10N, I hope that it's going to be well received.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-4650403743612823454?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/4650403743612823454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=4650403743612823454' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4650403743612823454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4650403743612823454'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/09/fastformat-about-to-drop-and-its-fast.html' title='FastFormat about to drop ... and it&apos;s FAST!'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1737293009460302546</id><published>2008-08-28T00:08:00.000-07:00</published><updated>2008-08-28T00:10:28.637-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FastFormat'/><title type='text'>... FastFormat?</title><content type='html'>For those long-suffering waitees for the long-promised revolution in string formatting that is &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt;, I promise that the wait won't be much longer. I've got a few things on my plate over the next few days, and then FF is top of the list. All that's left to do is sort out a few distro issues, and tidy up the docs, and we're ready to rock and roll. (At least for an alpha version, anyway.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1737293009460302546?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1737293009460302546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1737293009460302546' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1737293009460302546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1737293009460302546'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/08/fastformat.html' title='... FastFormat?'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-485955457917999773</id><published>2008-08-28T00:03:00.000-07:00</published><updated>2008-08-28T00:08:20.860-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='build systems'/><category scheme='http://www.blogger.com/atom/ns#' term='cmake'/><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><title type='text'>CMake; Pantheios</title><content type='html'>I just received my recently-ordered copy of "Mastering CMake" (Martin &amp;amp; Hoffman), and plan to make good use of it next week, as I investigate options in reducing the management overhead of my various open-source libraries.&lt;br /&gt;&lt;br /&gt;If anyone's got any useful experience, I'd be glad to hear it.&lt;br /&gt;&lt;br /&gt;I'll let you know how it goes&lt;br /&gt;&lt;br /&gt;Matt&lt;br /&gt;&lt;br /&gt;btw, the latest release of &lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt;, &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=141831&amp;amp;package_id=155759"&gt;1.0.1 beta 152&lt;/a&gt;, contains the long-requested feature of a source-only distribution, cutting download size for people who prefer to get the docs online from ~4.8 MB to ~2.5.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-485955457917999773?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/485955457917999773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=485955457917999773' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/485955457917999773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/485955457917999773'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/08/cmake.html' title='CMake; Pantheios'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-7308206395253827871</id><published>2008-08-23T23:20:00.000-07:00</published><updated>2008-08-23T23:23:00.594-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='release'/><category scheme='http://www.blogger.com/atom/ns#' term='Pantheios'/><title type='text'>Pantheios 1.0.1 (beta 150) released</title><content type='html'>&lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt; is an Open Source C/C++ Logging API library, offering an optimal combination of 100% type-safety, efficiency, genericity and extensibility. It is simple to use and extend, highly-portable (platform and compiler-independent) and, best of all, it upholds&lt;br /&gt;the C tradition of you only pay for what you use.&lt;br /&gt;&lt;br /&gt;Pantheios supports logging of message statements of arbitrary complexity, consisting of heterogeneous types.&lt;br /&gt;&lt;br /&gt;Pantheios supports filtering of log messages based on severity level including (but not limited to) the eight levels defined by the SysLog protocol.&lt;br /&gt;&lt;br /&gt;Pantheios supports back-end output, individually and in combination, to stderr/stdout, SysLog (including a custom implementation of the SysLog protocol for Windows), Windows debugger, Windows event log, COM Error Object, Speech, or any custom back-end extension you care to write. Importantly, Pantheios is readily extended to use the existing transport mechanisms of feature-rich logging libraries such as ACE, log4cpp, log4cplus, log4cxx.&lt;br /&gt;&lt;br /&gt;Pantheios does not contain any compiler-specific or platform-specific constructs. It supports UNIX (including Linux and Mac OS-X), and Windows, and should work with any operating system. It is known to be compatible with Borland (5.5.1+), Comeau (4.3.3+), Digital Mars (8.45+), GCC (3.2+), Intel (6+), Metrowerks (8+), Microsoft Visual C++ (5.0+), and should work with any reasonably modern C++ compiler.&lt;br /&gt;&lt;br /&gt;Pantheios is completely free and includes source released under a BSD-style license. Commercial customisations (of front-/back-ends are provided by Synesis Software Pty Ltd; http://synesis.com.au/contact.html)&lt;br /&gt;&lt;br /&gt;Release 1.0.1 beta 150 incorporates:&lt;br /&gt;* fixed defect in fe.N, whereby a negative catch-all severity ceiling would not be respected&lt;br /&gt;* other minor adjustments/improvements to fe.N&lt;br /&gt;* added unit-test for fe.N&lt;br /&gt;* bundles xTests 0.8.5&lt;br /&gt;* NOTE: Now requires &lt;a href="http://stlsoft.org/"&gt;STLSoft&lt;/a&gt; 1.9.48&lt;br /&gt;* NOTE: These are breaking changes. Any code using the extant fe.N front-end library will need to be edited and re-compiled&lt;br /&gt;&lt;br /&gt;Note: this release of Pantheios requires &lt;a href="http://stlsoft.org/"&gt;STLSoft&lt;/a&gt; 1.9.48, or later.&lt;br /&gt;&lt;br /&gt;Download from: &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=141831&amp;amp;package_id=155759"&gt;http://sourceforge.net/project/showfiles.php?group_id=141831&amp;amp;package_id=155759&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Discuss at: &lt;a href="http://sourceforge.net/forum/forum.php?forum_id=475313"&gt;http://sourceforge.net/forum/forum.php?forum_id=475313&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-7308206395253827871?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/7308206395253827871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=7308206395253827871' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7308206395253827871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7308206395253827871'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/08/pantheios-101-beta-150-released.html' title='Pantheios 1.0.1 (beta 150) released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-3659317761499427068</id><published>2008-08-23T06:32:00.000-07:00</published><updated>2008-08-23T06:37:33.636-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VOLE'/><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>VOLE 0.5.1 released</title><content type='html'>Version &lt;a href="http://sourceforge.net/project/platformdownload.php?group_id=185401"&gt;0.5.1 of VOLE&lt;/a&gt; released.&lt;br /&gt;&lt;br /&gt;Changes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;renamed coercion level &lt;span style="font-family:courier new;"&gt;nonDestructiveTruncation&lt;/span&gt; to &lt;span style="font-family:courier new;"&gt;nonDestructiveCoercion&lt;/span&gt;&lt;/li&gt;&lt;li&gt;added &lt;span style="font-family:courier new;"&gt;com_return_traits&amp;lt;float&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;added &lt;span style="font-family:courier new;"&gt;com_return_traits&amp;lt;double&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;changed behaviour for &lt;span style="font-family:courier new;"&gt;com_return_traits&amp;lt;bool&gt;&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;com_return_traits&amp;lt;short&gt;&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;com_return_traits&amp;lt;int&gt;&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;com_return_traits&amp;lt;long&gt;&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;com_return_traits&amp;lt;std::string&gt;&lt;/span&gt; and &lt;span style="font-family:courier new;"&gt;com_return_traits&amp;lt;std::wstring&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;added test.unit.return_traits.builtins&lt;/li&gt;&lt;li&gt;added test.unit.return_traits.std_types&lt;/li&gt;&lt;/ul&gt;&lt;/std::wstring&gt;&lt;/std::string&gt;&lt;br /&gt;&lt;?xml:namespace prefix = std /&gt;&lt;std::string&gt;&lt;std::wstring&gt;&lt;/std::wstring&gt;&lt;/std::string&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-3659317761499427068?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/3659317761499427068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=3659317761499427068' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3659317761499427068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3659317761499427068'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/08/vole-051-released.html' title='VOLE 0.5.1 released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-3458043233738142216</id><published>2008-08-23T06:29:00.000-07:00</published><updated>2008-08-23T06:32:01.801-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><category scheme='http://www.blogger.com/atom/ns#' term='xTests'/><title type='text'>xTests 0.8.5 released</title><content type='html'>Version &lt;a href="http://sourceforge.net/project/platformdownload.php?group_id=211081"&gt;0.8.5 of xTests&lt;/a&gt; released.&lt;br /&gt;&lt;br /&gt;Changes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;added call to XTESTS_TEST_PASSED() when an expected exception is received&lt;/li&gt;&lt;li&gt;added more integer specialisations of xtests_failure_reporter&lt;&gt;&lt;/li&gt;&lt;li&gt;fixed a defect in the approximate comparison of negative floating-point   numbers&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-3458043233738142216?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/3458043233738142216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=3458043233738142216' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3458043233738142216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3458043233738142216'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/08/xtests-085-released.html' title='xTests 0.8.5 released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-4714345256003733456</id><published>2008-08-23T05:31:00.000-07:00</published><updated>2008-08-23T05:33:19.691-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STLSoft'/><category scheme='http://www.blogger.com/atom/ns#' term='release'/><category scheme='http://www.blogger.com/atom/ns#' term='COMSTL'/><title type='text'>1.9.48 released</title><content type='html'>Just released &lt;a href="http://stlsoft.org/downloads.html#stlsoft_1_9_48"&gt;1.9.48&lt;/a&gt;, which contains an essentail fix to stlsoft::trim_all(), and a number of additions to COMSTL.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-4714345256003733456?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/4714345256003733456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=4714345256003733456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4714345256003733456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4714345256003733456'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/08/1948-released.html' title='1.9.48 released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-3910589827681056627</id><published>2008-08-22T16:17:00.000-07:00</published><updated>2008-08-22T21:45:47.557-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VOLE'/><category scheme='http://www.blogger.com/atom/ns#' term='type conversions'/><category scheme='http://www.blogger.com/atom/ns#' term='C++ Standard'/><title type='text'>The language that never ends ...</title><content type='html'>It has been said (alas, a reference escapes me at this time) that nobody can know all of C++.&lt;br /&gt;&lt;br /&gt;Well, today I've just had another proof of it (not that I ever thought I knew all the language). Question: what's wrong with the following code?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;bool fn()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;void* p = 0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return p;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: absolutely nothing. Yes, that's right, you can convert an "rvalue of arithmetic, enumeration, pointer, or pointer-to-member type" to an rvalue of type &lt;span style="font-family:courier new;"&gt;bool&lt;/span&gt;(C++ Standard: 4.12.)&lt;br /&gt;&lt;br /&gt;Who'd a thought it?!&lt;br /&gt;&lt;br /&gt;I found upon this because I'm changing the way some of the type conversions work in &lt;a href="http://vole.sourceforge.net/"&gt;VOLE&lt;/a&gt; as part of the new functionality of version 0.5. As well as adding specialisations of &lt;span style="font-family:courier new;"&gt;vole::com_return_traits&amp;lt;&gt;&lt;/span&gt; for &lt;span style="font-family:courier new;"&gt;float&lt;/span&gt; and &lt;span style="font-family:courier new;"&gt;double&lt;/span&gt;, I'm adding comprehensive (i.e. a cartesian product of from-type, to-type and coercion level) unit-tests for the builtins' specialisations. I thought that &lt;span style="font-family:courier new;"&gt;com_return_traits&amp;lt;bool&gt;&lt;/span&gt; was too permissive, in allowing any of the basic integral types to be converted when the coercion level is &lt;span style="font-family:courier new;"&gt;naturalPromotion&lt;/span&gt;.  Turns out I was wrong!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-3910589827681056627?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/3910589827681056627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=3910589827681056627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3910589827681056627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3910589827681056627'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/08/language-that-never-ends.html' title='The language that never ends ...'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-8003536707989204694</id><published>2008-08-21T06:10:00.000-07:00</published><updated>2008-09-27T21:06:11.213-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='build systems'/><title type='text'>makefiles and build directories</title><content type='html'>Further to &lt;a href="http://stlsoft-musings.blogspot.com/2008/08/synesis-software-object-library-naming.html"&gt;a recent blog post&lt;/a&gt;, about object library naming conventions, there's also some debate about the makefile naming and build directory structure. Historically, there have been three main forms of build-dir+makefile-naming with most &lt;a href="http://stlsoft.wiki.sourceforge.net/Dependent+Projects"&gt;STLSoft-dependent libraries&lt;/a&gt;:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;solo&lt;/span&gt;: e.g. the &lt;span style="font-family: courier new;"&gt;bc584&lt;/span&gt; directory (for Borland C/C++ 5.84) contained the single makefile &lt;span style="font-family: courier new;"&gt;makefile&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;multi-os&lt;/span&gt;, e.g. the &lt;span style="font-family: courier new;"&gt;gcc34&lt;/span&gt; directory (for GCC 3.4) contained the makefiles &lt;span style="font-family: courier new;"&gt;makefile.unix&lt;/span&gt; (for UNIX) and &lt;span style="font-family: courier new;"&gt;makefile.win32&lt;/span&gt; (for Windows)&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;multi-arch&lt;/span&gt;, e.g. the &lt;span style="font-family: courier new;"&gt;vc8_x64&lt;/span&gt; directory (for Visual C++ 8 (x64)) contained the makefile &lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;makefile&lt;/span&gt; (for 64-bit Windows)&lt;/li&gt;&lt;/ol&gt;Obviously, there's a degree of inconsistency there. Furthermore, using the &lt;span style="font-weight: bold;"&gt;multi-os&lt;/span&gt; form was a pain because it meant having to explictly write '&lt;span style="font-family: courier new;"&gt;make -f makefile.unix&lt;/span&gt;' (or equivalent), rather than just &lt;span style="font-family: courier new;"&gt;make&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;This has all changed now, and all projects will eventually adopt the new form, which is:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;solo&lt;/span&gt;: e.g. the &lt;span style="font-family: courier new;"&gt;bc584&lt;/span&gt; directory contains the single makefile &lt;span style="font-family: courier new;"&gt;makefile&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;multi-os&lt;/span&gt;, e.g. the &lt;span style="font-family: courier new;"&gt;gcc34.unix&lt;/span&gt; directory contains the makefile &lt;span style="font-family: courier new;"&gt;makefile&lt;/span&gt;, and the &lt;span style="font-family: courier new;"&gt;gcc34.win32&lt;/span&gt; contains the makefile &lt;span style="font-family: courier new;"&gt;makefile&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;multi-arch&lt;/span&gt;, e.g. the &lt;span style="font-family: courier new;"&gt;vc8.x64&lt;/span&gt; directory contains the makefile &lt;span style="font-family: courier new;"&gt;makefile&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-8003536707989204694?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/8003536707989204694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=8003536707989204694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8003536707989204694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8003536707989204694'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/08/makefiles-and-build-directories.html' title='makefiles and build directories'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-760932211548606964</id><published>2008-08-21T00:54:00.000-07:00</published><updated>2008-08-21T17:40:03.155-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='libraries'/><title type='text'>Synesis Software Object Library Naming Conventions explained ... I think</title><content type='html'>I'm writing up some docs as part of the seemingly never-ending process of getting &lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt; ready for its 1.0 final release.  Part of this is documenting the object library naming conventions.&lt;br /&gt;&lt;br /&gt;For a given &lt;a href="http://synesis.com.au/"&gt;Synesis Software&lt;/a&gt; project (&lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt;, &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt;, &lt;a href="http://synesis.com.au/software/unixem.html"&gt;UNIXEm&lt;/a&gt;, &lt;a href="http://shwild.org/"&gt;shwild&lt;/a&gt;, etc.), the object libraries are named according to the following convention:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-family:courier new;"&gt;[lib]&amp;lt;library-name&gt;.&amp;lt;major-version&gt;.&amp;lt;module-name&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;.&amp;lt;compiler-name&gt;[.&amp;lt;os-arch-tag&gt;]&lt;br /&gt;&amp;nbsp;&amp;nbsp;[.&amp;lt;threading-tag&gt;][.&amp;lt;nox-tag&gt;][.&amp;lt;debug-tag&gt;].{a|lib}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Some examples might help.&lt;br /&gt;&lt;br /&gt;For the Pantheios core library for VC++ 9 in DLL configuration and debug mode the library name would be:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-family:courier new;"&gt;pantheios.1.core.vc9.dll.debug.lib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For the Pantheios core library for GCC 4.2 in multithreaded configuration on UNIX the library name would be:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-family:courier new;"&gt;libpantheios.1.core.gcc42.mt.a&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So far so good. Let's jazz it up a little. Consider the NoX - No eXception - builds, which are usually only provided for VC++ 6. Let's say we now want a NoX build of the single-threaded VC debug object library:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-family:courier new;"&gt;pantheios.1.core.vc6.nox.debug.lib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And the multithreaded (non-DLL) version:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-family:courier new;"&gt;pantheios.1.core.vc6.mt.nox.debug.lib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Where this starts to fall down is in two ways: when emulating UNIX builds on Windows, and when defining x64 builds of UNIX. For a first example, let's look at the UNIX-emulation, non-NoX variant of the last VC 6 one:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-family:courier new;"&gt;pantheios.1.core.vc6.unix.mt.debug.lib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Even this has a certain consistency about it. But where it currently really starts to fall down is with the 64-bit Windows versions of things. Consider an x64 version of the VC 9 configuration. It is currently:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-family:courier new;"&gt;pantheios.1.core.vc9_x64.mt.debug.lib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ideally this should be changed to:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-family:courier new;"&gt;pantheios.1.core.vc9.x64.mt.debug.lib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But then if we're emulating 64-bit UNIX on x64, how would we represent this? Would it be:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-family:courier new;"&gt;pantheios.1.core.vc9.unix.x64.mt.debug.lib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-family:courier new;"&gt;pantheios.1.core.vc9.x64.unix.mt.debug.lib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="font-family:courier new;"&gt;pantheios.1.core.vc9.unix_x64.mt.debug.lib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I'm keen to get some external opinions on this, as the inconsistency can't stand, but making such changes now will be significant.&lt;br /&gt;&lt;br /&gt;The other aspect of this issue is that all the changes to all Synesis libraries will have to be made pretty much at once. This is sticky stuff ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-760932211548606964?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/760932211548606964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=760932211548606964' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/760932211548606964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/760932211548606964'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/08/synesis-software-object-library-naming.html' title='Synesis Software Object Library Naming Conventions explained ... I think'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-6917683754277988354</id><published>2008-08-18T23:54:00.000-07:00</published><updated>2008-08-19T00:00:29.370-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='strategy'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><title type='text'>2008's the year for STLSoft</title><content type='html'>And as part of that effort I'll be attempting to do daily blogs on the subject. This being the first (and least informative).&lt;br /&gt;&lt;br /&gt;In the last couple of days I've transferred the unit-tests for stlsoft::auto_buffer and stlsoft::frequency_map to the new unit-testing framework (using &lt;a href="http://xtests.sourceforge.net/"&gt;xTests&lt;/a&gt;). I'm hoping to do move at least one component under test each day, until they're all done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-6917683754277988354?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/6917683754277988354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=6917683754277988354' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/6917683754277988354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/6917683754277988354'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/08/2008s-year-for-stlsoft.html' title='2008&apos;s the year for STLSoft'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1364595074785852358</id><published>2008-08-11T01:43:00.000-07:00</published><updated>2008-08-11T01:45:15.043-07:00</updated><title type='text'>1.9.46 released</title><content type='html'>&lt;a href="http://stlsoft.org/downloads.html"&gt;This&lt;/a&gt; takes into account fixes to defects in stlsoft::pod_vector, and a few other sundry issues.&lt;br /&gt;&lt;br /&gt;The next release, due out tomorrow, will incorporate application of parentheses in contract enforcement statements that are currently confusing GCC 4.3.&lt;br /&gt;&lt;br /&gt;I'm hoping that there'll be a change of packaging in 1.9.48, within the next week or so.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1364595074785852358?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1364595074785852358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1364595074785852358' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1364595074785852358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1364595074785852358'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/08/1946-released.html' title='1.9.46 released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-8376224116584204023</id><published>2008-08-09T14:51:00.000-07:00</published><updated>2008-08-09T15:02:08.017-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plans'/><category scheme='http://www.blogger.com/atom/ns#' term='books'/><category scheme='http://www.blogger.com/atom/ns#' term='libraries'/><title type='text'>Back from holiday: Aug=&gt;Dec 08 plans</title><content type='html'>My family and I were in Europe visiting friends and family from late June to late July, and I have been catching up with things, mostly commercial, since we got back, so there's not been a lot happening with &lt;a href="http://stlsoft.org/"&gt;STLSoft&lt;/a&gt; and the other libraries. (I have, of course, cranked out a few more beta releases of &lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt; ...)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now we're back, I have work sketched out for the rest of the year on four fronts:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;commercial activities:&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;I'm helping a client rescue and move forward a C++/COM codebase that's been going for 12+ years. This is a huge challenge, but I think we're going to have a lot of fun&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;I'm also taking on a few more commercial customisations of Pantheios&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;writing:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;books: "Breaking Up The Monolith" will be getting a big lot of time in Sept and onwards, with the intent to finish it before the end of the year; am also starting a couple of other, less demanding, books&lt;br /&gt;&lt;/li&gt;&lt;li&gt;articles: I'm planning to get back to writing articles, hopefully for DDJ, ACCU, and others, this year&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;libraries:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Pantheios - get it out of beta, and on the 1.1, 1.2, 1.3 development track; nearly there, honest!&lt;/li&gt;&lt;li&gt;FastFormat - release the first public alpha before the end of this month&lt;/li&gt;&lt;li&gt;xContract and xCover - release first public alphas soon&lt;/li&gt;&lt;li&gt;STLSoft - get 1.10 out, including better distributions (incl. new unit-testing facilities), and docs&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;websites&lt;/li&gt;&lt;ul&gt;&lt;li&gt;need to get the &lt;a href="http://synesis.com.au/"&gt;Synesis Software website&lt;/a&gt; redone - it's not exactly full of wow! at the moment. ;-)&lt;/li&gt;&lt;li&gt;Pantheios site has been redesigned, and just needs replacing&lt;/li&gt;&lt;li&gt;STLSoft website: intention here is to have docs, articles, blogs (not just for me), and other stuff&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;So, that's a list of my modest ambitions for the remainder of 2008. Wish me luck!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-8376224116584204023?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/8376224116584204023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=8376224116584204023' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8376224116584204023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8376224116584204023'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/08/back-from-holiday-augdec-08-plans.html' title='Back from holiday: Aug=&gt;Dec 08 plans'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1767957873416012082</id><published>2008-06-09T15:19:00.000-07:00</published><updated>2008-06-09T15:23:04.209-07:00</updated><title type='text'>Fluffing around</title><content type='html'>In the &lt;a href="http://stlsoft-musings.blogspot.com/2008/05/flecxx-fastformat-and-other-stuff.html"&gt;last post&lt;/a&gt; I promised to get &lt;strong&gt;&lt;a href="http://flecxx.org/"&gt;flecxx&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt;&lt;/strong&gt; launched or die. Well, I got half there in launching &lt;strong&gt;flecxx&lt;/strong&gt; (and I'm still here).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;FastFormat&lt;/strong&gt;'s almost ready to go; it's just that work is getting in the way. In the meantime, I have cleaned up &lt;strong&gt;&lt;a href="http://recls.org/"&gt;recls&lt;/a&gt;&lt;/strong&gt; and released it - first one since Oct 07 - and now I'm free and clear to work on recls 1.9 (which will be released via SourceForge, where all of recls will be eventually moved).&lt;br /&gt;&lt;br /&gt;As for FastFormat, it's going to be this coming weekend, for sure. Honest!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1767957873416012082?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1767957873416012082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1767957873416012082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1767957873416012082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1767957873416012082'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/06/fluffing-around.html' title='Fluffing around'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-7751439051314732028</id><published>2008-05-29T17:04:00.000-07:00</published><updated>2008-05-29T19:20:52.523-07:00</updated><title type='text'>flecxx, FastFormat and other stuff ...</title><content type='html'>Well, the time has finally arrived, and I've got my shit together, and I am going to release either/both &lt;a href="http://flecxx.org/"&gt;flecxx&lt;/a&gt; and &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt; this weekend, or die in the effort.&lt;br /&gt;&lt;br /&gt;The first thing will be to release STLSoft 1.9.43, as there're a few changes (mostly to do with reducing the clash with the "Safe String Library" with VC++ 8+) that're required for the current versions of the two libraries.&lt;br /&gt;&lt;br /&gt;Then I'll be attempting to get the unit- and component-tests completed for them, putting together the distributions, and then letting them loose on the world.&lt;br /&gt;&lt;br /&gt;For those who've not yet been exposed to the pitifully inadequate propaganda regarding these libraries, they can be summarised as follows:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;flecxx&lt;/strong&gt; is a very simple, lightweight (no runtime costs, and 100% header-only) library that removes &lt;a href="http://breakingupthemonolith.com/glossary.html#abstraction-dissonance"&gt;abstraction dissonance&lt;/a&gt;. The classic example of abstraction dissonance in the C++ standard library is the pitiful requirement to invoke &lt;span style="font-family:courier new;"&gt;c_str()&lt;/span&gt; in order to allow std::string arguments to be passed to the constructors of &lt;span style="font-family:courier new;"&gt;std::[if]stream&lt;/span&gt;. This and many other vexing syntactic intrusions of leaking abstractions are handled by &lt;strong&gt;flecxx&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;FastFormat&lt;/strong&gt; is a much bigger chicken. It uses the &lt;a href="http://breakingupthemonolith.com/glossary.html#shim"&gt;Shims&lt;/a&gt;-based &lt;a href="http://breakingupthemonolith.com/glossary.html#type-tunnel"&gt;Type Tunneling&lt;/a&gt; also used by &lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt; (and which allows it to be at once 100% type-safe and orders of magnitude more efficient than any other logging libraries), and provides output/formatting to all types of things, including formatting strings, writing to stdout/cout, speech synthesis, logging, etc. etc. As well as very high speed, 100% type-safety (something that is not available with either the C standard library's &lt;span style="font-family:courier new;"&gt;printf()&lt;/span&gt; family or the C++ standard library's &lt;strong&gt;IOStreams&lt;/strong&gt;!), extensibility, expressiveness and portability, &lt;strong&gt;FastFormat&lt;/strong&gt; also offers support for &lt;a href="http://en.wikipedia.org/wiki/I18N"&gt;I18N/L15N&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Consider the following examples:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;std::cout&amp;amp; sink1 = std::cout;&lt;br /&gt;std::string sink2;&lt;br /&gt;stlsoft::simple_string sink3;&lt;br /&gt;&lt;br /&gt;char const* arg0 = "cat";&lt;br /&gt;std::string arg1("sat");&lt;br /&gt;stlsoft::simple_string arg2("mat");&lt;br /&gt;&lt;br /&gt;fastformat::fmt(sink1, "the {0} {1} on the {2}", arg0, arg1, arg2);&lt;br /&gt;fastformat::fmt(sink2, "the {0} {1} on the {2}", arg0, arg1, arg2);&lt;br /&gt;fastformat::fmt(sink3, "the {0} {1} on the {2}", arg0, arg1, arg2);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The example illustrates the use of three different sink types (std::cout, std::string, stlsoft::simple_string), and three different argument types (std::string, stlsoft::simple_string, C-style string), used in combination with each other.&lt;br /&gt;&lt;br /&gt;The format strings in this example are all C-style strings. They can equally be any other string type, e.g.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;std::string fmt1("the {0} {1} on the {2}");&lt;br /&gt;stlsoft::simple_string fmt2("the {0} {1} on the {2}");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;fastformat::fmt(sink3, fmt1, arg0, arg1, arg2);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;fastformat::fmt(sink3, fmt2, arg0, arg1, arg2);  &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Because the format arguments are numbered, it is straightforward to support languages whose grammer require different ordering. Should we require the same logical string to render the arguments in a different order, we can do this easily:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;fastformat::fmt(sink1, "on the {2} {1} the {0}", arg0, arg1, arg2); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This can be taken further, and in fact is taken further by the provision of &lt;em&gt;resource bundles&lt;/em&gt;. The stock resource bundles provided by the library include Windows INI format, Properties File, and Record-JAR. Thus, I18N/L15N is easily supported by loading a locale-dependent resource bundle file, and looking up the formats by name, as in:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;fastformat::properties_bundle bundle("GermanFormats.txt");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;fastformat::fmt(sink1, bundle["cat-sat-fmt"], arg0, arg1, arg2);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In another post - hopefully &lt;em&gt;after&lt;/em&gt; FastFormat has been released this coming w/e - I'll talk further about how to use it, and why it is so efficient.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-7751439051314732028?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/7751439051314732028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=7751439051314732028' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7751439051314732028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/7751439051314732028'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/05/flecxx-fastformat-and-other-stuff.html' title='flecxx, FastFormat and other stuff ...'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-4309590993617090624</id><published>2008-05-04T17:43:00.000-07:00</published><updated>2008-05-04T18:35:01.997-07:00</updated><title type='text'>1.9.38 - Win64 on its way</title><content type='html'>Ok, so we're still currently defining &lt;span style="font-family:courier new;"&gt;_CRT_SECURE_NO_DEPRECATE&lt;/span&gt; in the &lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt; VC8+ makefiles, but other than that, we're on for Win64-bit in several of the &lt;a href="http://stlsoft.org/"&gt;STLSoft-dependent libraries&lt;/a&gt;. So far, I've verified &lt;a href="http://xtests.org/"&gt;xTests&lt;/a&gt;, &lt;a href="http://shwild.org/"&gt;shwild&lt;/a&gt; and Pantheios on Win64. (Neither &lt;strong&gt;xTests&lt;/strong&gt; nor &lt;strong&gt;shwild&lt;/strong&gt; need to use &lt;span style="font-family:courier new;"&gt;_CRT_SECURE_NO_DEPRECATE&lt;/span&gt; in order to build correctly with VC8+.)&lt;br /&gt;&lt;br /&gt;As for &lt;strong&gt;STLSoft&lt;/strong&gt; itself, it's still pretty far from complete for Win64, but as each dependent library is moved across, more of &lt;strong&gt;STLSoft&lt;/strong&gt; itself will be readied. As time goes by, I'm gradually reworking and improving the unit-/component-tests used on the library, and will be making sure that each test is compatible with Win64 building. Eventually, we'll get the whole thing across. ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-4309590993617090624?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/4309590993617090624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=4309590993617090624' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4309590993617090624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4309590993617090624'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/05/1938-win64-on-its-way.html' title='1.9.38 - Win64 on its way'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-8982248114147837334</id><published>2008-04-30T15:19:00.000-07:00</published><updated>2008-04-30T16:13:29.496-07:00</updated><title type='text'>1.9.36 FreeBSD compatibility for free!</title><content type='html'>Just want to let you know about, and simultaneously give thanks to Sergey Nikulov for, FreeBSD compatibility in STLSoft (as of &lt;a href="http://stlsoft.org/"&gt;1.9.36&lt;/a&gt;) and Pantheios (as of &lt;a href="https://sourceforge.net/projects/pantheios/"&gt;1.0.1 beta 128&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;I'm still working on Win64, and will continue with that effort. But it's now very cool that Pantheios is working on Win32, Linux 32, Linux 64, Solaris 32, Solaris 64 and FreeBSD.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-8982248114147837334?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/8982248114147837334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=8982248114147837334' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8982248114147837334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/8982248114147837334'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/04/1936-freebsd-compatibility-for-free.html' title='1.9.36 FreeBSD compatibility for free!'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-4735903663688148083</id><published>2008-04-27T16:23:00.000-07:00</published><updated>2008-04-28T13:06:13.955-07:00</updated><title type='text'>1.9.x roadmap (Apr / May 08)</title><content type='html'>Ok, yes, 1.9 should have been dead and buried a year ago, to be surplanted by the wonderful 1.10, but the real world's got this bad habit of getting in the way. (And I've been putting in heaps on &lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt;.)&lt;br /&gt;&lt;br /&gt;So 1.9.x is still living, and there's quite a bit to do on it. The currently envisioned roadmap is as follows:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;1.9.35 will be released in the next 24 hours, and will contain an update to the &lt;a href="http://stlsoft.org/doc-1.9/group__group____library____windows__registry.html"&gt;Windows Registry&lt;/a&gt; library's &lt;span style="font-family:courier new;"&gt;winstl::basic_reg_value&lt;/span&gt;, comprising the new &lt;span style="font-family:courier new;"&gt;value_multi_sz()&lt;/span&gt; method, whose original implementation was kindly provided by Austin Ziegler&lt;/li&gt;&lt;li&gt;1.9.36 A first stab at full x64 support&lt;/li&gt;&lt;li&gt;1.9.37 getting all the Safe String library compatibility done. This is going to be a big effort. :-(&lt;/li&gt;&lt;li&gt;1.9.38 A second stab at full x64 support, since I'm unlikely to have it down pat the first go.&lt;/li&gt;&lt;li&gt;1.9.39 This'll likely comprise the ATL/MFC stuff that Claudio's been asking for since, er, early last year :$&lt;/li&gt;&lt;li&gt;1.9.40 This'll probably include a (#define-reenableable) removal of the stuff in stlsoft/std/*.hpp, as this is eminently bettered by the new &lt;a href="http://sf.net/projects/flecxx"&gt;flecxx&lt;/a&gt; library, that is due to be released very, very soon. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Other than that, I'm going to try and get the 1.10 preview releases started. Given the time ... ;-)&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-4735903663688148083?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/4735903663688148083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=4735903663688148083' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4735903663688148083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/4735903663688148083'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/04/19x-roadmap-apr-may-08.html' title='1.9.x roadmap (Apr / May 08)'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-6704446164457619710</id><published>2008-04-24T18:44:00.000-07:00</published><updated>2008-04-24T20:13:10.969-07:00</updated><title type='text'>Sun Pro C/C++ compatibility with 1.9.33: step 1</title><content type='html'>The latest release - &lt;a href="http://stlsoft.org/downloads.html#latest"&gt;1.9.33&lt;/a&gt; - is now available, and contains modifications to enable compatibility with the Sun Pro C and C++ compilers (version 5.9).&lt;br /&gt;&lt;br /&gt;The modifications were something of a marathon effort, and it might be good to spread the information around for anyone contemplating porting STLSoft to another C++ compiler.&lt;br /&gt;&lt;br /&gt;In this post, I'll discuss how to get the basic support in there, which is basically recognising the Sun Pro compilers and defining their features&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Recognising the Sun Pro compilers&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I began with the position that I was confident on, based on &lt;a href="http://www.redi.uklinux.net/"&gt;Jonathan Wakely&lt;/a&gt;'s efforts with Pantheios, to whit: Pantheios and STLSoft work with Sun Pro when the &lt;span style="font-family: courier new;"&gt;-library=stlport4&lt;/span&gt; flag is defined to sunCC (the Sun Pro C++ compiler).&lt;br /&gt;&lt;br /&gt;In order to achieve this, all that was required was to discriminate the Sun Pro compiler in include/stlsoft/stlsoft.h, and provide a compiler compatibility file: include/stlsoft/internal/cccap/sunpro.h.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;In include/stlsoft/stlsoft.h, insert the following between the Metrowerks and VectorC discriminations:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#elif defined(__SUNPRO_C) || \&lt;br /&gt;      defined(__SUNPRO_CC)&lt;br /&gt; /* Sanity check on language/compiler */&lt;br /&gt;# ifdef __cplusplus&lt;br /&gt;#  ifdef __SUNPRO_C&lt;br /&gt;#   error __SUNPRO_C should not be defined by the Sun C compiler in C++ compilation&lt;br /&gt;#  endif /* __SUNPRO_C */&lt;br /&gt;#  ifndef __SUNPRO_CC&lt;br /&gt;#   error __SUNPRO_CC should be defined by the Sun C++ compiler in C++ compilation&lt;br /&gt;#  endif /* !__SUNPRO_CC */&lt;br /&gt;# else /* ? __cplusplus */&lt;br /&gt;#  ifndef __SUNPRO_C&lt;br /&gt;#   error __SUNPRO_C should be defined by the Sun C compiler in C compilation&lt;br /&gt;#  endif /* !__SUNPRO_C */&lt;br /&gt;#  ifdef __SUNPRO_CC&lt;br /&gt;#   error __SUNPRO_CC should not be defined by the Sun C++ compiler in C compilation&lt;br /&gt;#  endif /* __SUNPRO_CC */&lt;br /&gt;# endif /* __cplusplus */&lt;br /&gt;&lt;br /&gt;# define STLSOFT_COMPILER_IS_SUNPRO&lt;br /&gt;# ifdef __cplusplus&lt;br /&gt;#  define STLSOFT_COMPILER_LABEL_STRING         "Sun Pro C++"&lt;br /&gt;#  if (0x0590 == (__SUNPRO_CC &amp;amp; 0xFFF0))&lt;br /&gt;#   define STLSOFT_COMPILER_VERSION_STRING      "Sun Pro C++ v5.9"&lt;br /&gt;#  else /* ? __SUNPRO_CC */&lt;br /&gt;#   error Currently only version v5.9 of the Sun Pro C++ compiler is supported by the STLSoft libraries&lt;br /&gt;#  endif /* __SUNPRO_CC */&lt;br /&gt;# else /* ? __cplusplus */&lt;br /&gt;#  define STLSOFT_COMPILER_LABEL_STRING         "Sun Pro C"&lt;br /&gt;#  if (0x0590 == (__SUNPRO_C &amp;amp; 0xFFF0))&lt;br /&gt;#   define STLSOFT_COMPILER_VERSION_STRING      "Sun Pro C v5.9"&lt;br /&gt;#  else /* ? __SUNPRO_CC */&lt;br /&gt;#   error Currently only version v5.9 of the Sun Pro C compiler is supported by the STLSoft libraries&lt;br /&gt;#  endif /* __SUNPRO_CC */&lt;br /&gt;# endif /* __cplusplus */&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In include/stlsoft/stlsoft.h, insert the following between the Metrowerks and VectorC compiler compatibility inclusions&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#elif defined(STLSOFT_COMPILER_IS_SUNPRO)&lt;br /&gt;# include &amp;lt;stlsoft/internal/cccap/sunpro.h&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Defining the Sun Pro compilers' features&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Define a new file include/stlsoft/internal/cccap/sunpro.h, containing all the required definitions that describe the capabilities of the C and C++ compilers. The important bits are:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;/* /////////////////////////////////////////////////////////////////////////&lt;br /&gt; * File:        stlsoft/internal/cccap/sunpro.h&lt;br /&gt; *&lt;br /&gt; * Purpose:     Compiler feature discrimination for SunPro C / SunPro C++.&lt;br /&gt; *&lt;br /&gt; * Created:     24th April 2008&lt;br /&gt; * Updated:     25th April 2008&lt;br /&gt; *&lt;br /&gt; * Thanks:      To Jonathan Wakeley and Lars Ivar Igesund for help with&lt;br /&gt; *              getting STLSoft (and Pantheios) compatible with Solaris.&lt;br /&gt; *&lt;br /&gt; * Home:        http://stlsoft.org/&lt;br /&gt; *&lt;br /&gt; * Copyright (c) 2008, Matthew Wilson and Synesis Software&lt;br /&gt; * All rights reserved.&lt;br /&gt; *&lt;br /&gt; * Redistribution and use in source and binary forms, with or without&lt;br /&gt; * modification, are permitted provided that the following conditions are met:&lt;br /&gt; *&lt;br /&gt; * - Redistributions of source code must retain the above copyright notice, this&lt;br /&gt; *   list of conditions and the following disclaimer.&lt;br /&gt; * - Redistributions in binary form must reproduce the above copyright notice,&lt;br /&gt; *   this list of conditions and the following disclaimer in the documentation&lt;br /&gt; *   and/or other materials provided with the distribution.&lt;br /&gt; * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of&lt;br /&gt; *   any contributors may be used to endorse or promote products derived from&lt;br /&gt; *   this software without specific prior written permission.&lt;br /&gt; *&lt;br /&gt; * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"&lt;br /&gt; * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&lt;br /&gt; * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE&lt;br /&gt; * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE&lt;br /&gt; * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR&lt;br /&gt; * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF&lt;br /&gt; * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS&lt;br /&gt; * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN&lt;br /&gt; * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)&lt;br /&gt; * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE&lt;br /&gt; * POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt; *&lt;br /&gt; * ////////////////////////////////////////////////////////////////////// */&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT&lt;br /&gt;# error This file must not be included independently of stlsoft/stlsoft.h&lt;br /&gt;#endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */&lt;br /&gt;&lt;br /&gt;/** \file stlsoft/internal/cccap/sunpro.h&lt;br /&gt; *&lt;br /&gt; * Compiler feature discrimination for SunPro C / SunPro C++.&lt;br /&gt; * (\ref group__library__internal).&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;#ifdef STLSOFT_INCL_H_STLSOFT_CCCAP_SUNPRO&lt;br /&gt;# error This file cannot be included more than once in any compilation unit&lt;br /&gt;#endif /* STLSOFT_INCL_H_STLSOFT_CCCAP_SUNPRO */&lt;br /&gt;&lt;br /&gt;/* ////////////////////////////////////////////////////////////////////// */&lt;br /&gt;&lt;br /&gt;#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION&lt;br /&gt;# define STLSOFT_VER_H_STLSOFT_CCCAP_SUNPRO_MAJOR      1&lt;br /&gt;# define STLSOFT_VER_H_STLSOFT_CCCAP_SUNPRO_MINOR      0&lt;br /&gt;# define STLSOFT_VER_H_STLSOFT_CCCAP_SUNPRO_REVISION   2&lt;br /&gt;# define STLSOFT_VER_H_STLSOFT_CCCAP_SUNPRO_EDIT       2&lt;br /&gt;#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */&lt;br /&gt;&lt;br /&gt;/* /////////////////////////////////////////////////////////////////////////&lt;br /&gt; * Auto-generation and compatibility&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;[&amp;lt;[STLSOFT-AUTO:NO-DOCFILELABEL]&gt;]&lt;br /&gt;[&amp;lt;[STLSOFT-AUTO:NO-UNITTEST]&gt;]&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;/* /////////////////////////////////////////////////////////////////////////&lt;br /&gt; * Helper definitions&lt;br /&gt; *&lt;br /&gt; * NOTE: These are #undef'd at the end of this file&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;# define _STLSOFT_SUNPRO_VER_   __SUNPRO_CC&lt;br /&gt;#else /* ? __cplusplus */&lt;br /&gt;# define _STLSOFT_SUNPRO_VER_   __SUNPRO_C&lt;br /&gt;#endif /* __cplusplus */&lt;br /&gt;&lt;br /&gt;#define _STLSOFT_SUNPRO_VER_MAJOR   ((_STLSOFT_SUNPRO_VER_ &amp; 0xff00) &gt;&gt; 8)&lt;br /&gt;#define _STLSOFT_SUNPRO_VER_MINOR   ((_STLSOFT_SUNPRO_VER_ &amp; 0x00f0) &gt;&gt; 4)&lt;br /&gt;&lt;br /&gt;/* /////////////////////////////////////////////////////////////////////////&lt;br /&gt; * Compiler features&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;#if (5 != _STLSOFT_SUNPRO_VER_MAJOR) || \&lt;br /&gt;    (9 != _STLSOFT_SUNPRO_VER_MINOR)&lt;br /&gt;# error The STLSoft libraries have only been verified with Sun Pro 5.9.x. Please contact Synesis Software&lt;br /&gt;#endif /* major.minor */&lt;br /&gt;&lt;br /&gt;/* ///////////////////////////////////////////////&lt;br /&gt; * Pre-processor / compiler&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;/* Messaging&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;/* #define STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT */&lt;br /&gt;&lt;br /&gt;/* Support for #pragma once&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;/* #define STLSOFT_CF_PRAGMA_ONCE_SUPPORT */&lt;br /&gt;&lt;br /&gt;/* Support for __FUNCTION__&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;/* #define STLSOFT_CF_FUNCTION_SYMBOL_SUPPORT */&lt;br /&gt;&lt;br /&gt;/* Variadic Macros&lt;br /&gt; *&lt;br /&gt; * Feature was buggy at one point, require 5.5 to be safe.&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;#if _STLSOFT_SUNPRO_VER_ &gt; 0x0550&lt;br /&gt;# define STLSOFT_CF_SUPPORTS_VARIADIC_MACROS&lt;br /&gt;#endif /* _STLSOFT_SUNPRO_VER_ */&lt;br /&gt;&lt;br /&gt;/* ///////////////////////////////////////////////&lt;br /&gt; * Types&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;/* bool */&lt;br /&gt;#if defined(__cplusplus) &amp;&amp; \&lt;br /&gt;    defined(_BOOL)&lt;br /&gt;# define STLSOFT_CF_NATIVE_BOOL_SUPPORT&lt;br /&gt;#endif /* __cplusplus */&lt;br /&gt;&lt;br /&gt;/* char (sign) */&lt;br /&gt;/* #define STLSOFT_CF_CHAR_IS_UNSIGNED */&lt;br /&gt;&lt;br /&gt;/* wchar_t */&lt;br /&gt;#ifdef _WCHAR_T&lt;br /&gt;# define STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;/* /////////////////////////////////////&lt;br /&gt; * Integral types&lt;br /&gt; *&lt;br /&gt; * The purpose of this section is to define the following types:&lt;br /&gt; *&lt;br /&gt; *  - 8-bit signed and unsigned integers&lt;br /&gt; *  - 16-bit signed and unsigned integers&lt;br /&gt; *  - 32-bit signed and unsigned integers&lt;br /&gt; *  - (optionally) 64-bit signed and unsigned integers&lt;br /&gt; *&lt;br /&gt; * and to define, where appropriate the following symbols (used for&lt;br /&gt; * overloading):&lt;br /&gt; *&lt;br /&gt; *  - STLSOFT_CF_CHAR_DISTINCT_INT_TYPE&lt;br /&gt; *  - STLSOFT_CF_SHORT_DISTINCT_INT_TYPE&lt;br /&gt; *  - STLSOFT_CF_INT_DISTINCT_INT_TYPE&lt;br /&gt; *  - STLSOFT_CF_LONG_DISTINCT_INT_TYPE&lt;br /&gt; *  - STLSOFT_CF_LONG_LONG_DISTINCT_INT_TYPE&lt;br /&gt; *&lt;br /&gt; * which indicate that a given type is not used in the size-specific types.&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#if defined(_LP64) || \&lt;br /&gt;    defined(__LP64__)&lt;br /&gt;# define _STLSOFT_SIZEOF_CHAR           (1)&lt;br /&gt;# define _STLSOFT_SIZEOF_SHORT          (2)&lt;br /&gt;# define _STLSOFT_SIZEOF_INT            (4)&lt;br /&gt;# define _STLSOFT_SIZEOF_LONG           (8)&lt;br /&gt;# define _STLSOFT_SIZEOF_LONG_LONG      (8)&lt;br /&gt;#else /* ? data model */&lt;br /&gt;# define _STLSOFT_SIZEOF_CHAR           (1)&lt;br /&gt;# define _STLSOFT_SIZEOF_SHORT          (2)&lt;br /&gt;# define _STLSOFT_SIZEOF_INT            (4)&lt;br /&gt;# define _STLSOFT_SIZEOF_LONG           (4)&lt;br /&gt;# define _STLSOFT_SIZEOF_LONG_LONG      (8)&lt;br /&gt;#endif /* data model */&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#if 0&lt;br /&gt;#if defined(__sparcv9)&lt;br /&gt;# error Use of Sun Pro has not yet been verified on 64-bit Sparc. Please contact Synesis Software&lt;br /&gt;#elif defined(__amd64)&lt;br /&gt;# error Use of Sun Pro has not yet been verified on x64. Please contact Synesis Software&lt;br /&gt;# ifndef __LP64__&lt;br /&gt;#  error LP64 memory model is assumed on x64. Please contact Synesis Software&lt;br /&gt;# endif /* __LP64__ */&lt;br /&gt;# define _STLSOFT_SIZEOF_CHAR           (1)&lt;br /&gt;# define _STLSOFT_SIZEOF_SHORT          (2)&lt;br /&gt;# define _STLSOFT_SIZEOF_INT            (4)&lt;br /&gt;# define _STLSOFT_SIZEOF_LONG           (8)&lt;br /&gt;# define _STLSOFT_SIZEOF_LONG_LONG      (8)&lt;br /&gt;#elif defined(__sparc) || \&lt;br /&gt;      defined(__i386)&lt;br /&gt;# define _STLSOFT_SIZEOF_CHAR           (1)&lt;br /&gt;# define _STLSOFT_SIZEOF_SHORT          (2)&lt;br /&gt;# define _STLSOFT_SIZEOF_INT            (4)&lt;br /&gt;# define _STLSOFT_SIZEOF_LONG           (4)&lt;br /&gt;# define _STLSOFT_SIZEOF_LONG_LONG      (8)&lt;br /&gt;#else /* ? data model */&lt;br /&gt;# error Use of Sun Pro has not been verified on any operation system other than x86, x64 and Sparc. Please contact Synesis Software&lt;br /&gt;#endif /* data model */&lt;br /&gt;#endif /* 0 */&lt;br /&gt;&lt;br /&gt;/* 8-bit integer */&lt;br /&gt;#define STLSOFT_CF_8BIT_INT_SUPPORT&lt;br /&gt;#define STLSOFT_SI08_T_BASE_TYPE        signed      char&lt;br /&gt;#define STLSOFT_UI08_T_BASE_TYPE        unsigned    char&lt;br /&gt;&lt;br /&gt;/* 16-bit integer */&lt;br /&gt;#define STLSOFT_CF_16BIT_INT_SUPPORT&lt;br /&gt;#define STLSOFT_SI16_T_BASE_TYPE        signed      short&lt;br /&gt;#define STLSOFT_UI16_T_BASE_TYPE        unsigned    short&lt;br /&gt;&lt;br /&gt;/* 32-bit integer */&lt;br /&gt;#define STLSOFT_CF_32BIT_INT_SUPPORT&lt;br /&gt;#define STLSOFT_SI32_T_BASE_TYPE        signed      int&lt;br /&gt;#define STLSOFT_UI32_T_BASE_TYPE        unsigned    int&lt;br /&gt;#define STLSOFT_CF_LONG_DISTINCT_INT_TYPE&lt;br /&gt;&lt;br /&gt;/* 64-bit integer */&lt;br /&gt;#define STLSOFT_CF_64BIT_INT_SUPPORT&lt;br /&gt;#define STLSOFT_CF_64BIT_INT_IS_long_long&lt;br /&gt;#define STLSOFT_SI64_T_BASE_TYPE        signed      long long&lt;br /&gt;#define STLSOFT_UI64_T_BASE_TYPE        unsigned    long long&lt;br /&gt;&lt;br /&gt;/* ///////////////////////////////////////////////&lt;br /&gt; * Language features&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;/* Anonymous unions */&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;# define STLSOFT_CF_ANONYMOUS_UNION_SUPPORT&lt;br /&gt;#endif /* __cplusplus */&lt;br /&gt;&lt;br /&gt;/* Member constants */&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;# define STLSOFT_CF_MEMBER_CONSTANT_SUPPORT&lt;br /&gt;#endif /* __cplusplus */&lt;br /&gt;&lt;br /&gt;/* Static assertions */&lt;br /&gt;#define STLSOFT_CF_STATIC_ASSERT_SUPPORT&lt;br /&gt;&lt;br /&gt;/* sign of modulus of negative numbers */&lt;br /&gt;#define STLSOFT_CF_NEGATIVE_MODULUS_POSITIVE_GIVES_NEGATIVE_RESULT&lt;br /&gt;&lt;br /&gt;/* RTTI support */&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;# define STLSOFT_CF_RTTI_SUPPORT&lt;br /&gt;#endif /* __cplusplus */&lt;br /&gt;&lt;br /&gt;/* Exception support */&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;# define STLSOFT_CF_EXCEPTION_SUPPORT&lt;br /&gt;#endif /* __cplusplus */&lt;br /&gt;&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;# define STLSOFT_CF_THROW_BAD_ALLOC&lt;br /&gt;#endif /* __cplusplus */&lt;br /&gt;&lt;br /&gt;/* Namespace support */&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;# define STLSOFT_CF_NAMESPACE_SUPPORT&lt;br /&gt;#endif /* __cplusplus */&lt;br /&gt;&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;# define STLSOFT_CF_std_NAMESPACE&lt;br /&gt;#endif /* __cplusplus */&lt;br /&gt;&lt;br /&gt;/* return void */&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;# define STLSOFT_CF_COMPILER_SUPPORTS_RETURN_VOID&lt;br /&gt;#endif /* __cplusplus */&lt;br /&gt;&lt;br /&gt;/* Template support */&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;# define STLSOFT_CF_TEMPLATE_SUPPORT&lt;br /&gt;#endif /* __cplusplus */&lt;br /&gt;&lt;br /&gt;/* #define STLSOFT_CF_TEMPLATE_TYPE_REQUIRED_IN_ARGS */&lt;br /&gt;&lt;br /&gt;/*  */&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ /* #define STLSOFT_CF_EXCEPTION_SPEC_EXPENSIVE */&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_FUNDAMENTAL_ARGUMENT_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_MEMBER_TEMPLATE_OVERLOAD_DISCRIMINATED&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_MEMBER_TEMPLATE_CTOR_OVERLOAD_DISCRIMINATED&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_MEMBER_TEMPLATE_RANGE_METHOD_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_MEMBER_TEMPLATE_CLASS_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_std_char_traits_AVAILABLE&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_PARENT_TYPES_CAN_BE_USED_IN_NON_TEMPLATE&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_PARENT_TYPES_CAN_BE_USED_IN_TEMPLATE&lt;br /&gt;&lt;br /&gt;#define STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT&lt;br /&gt;&lt;br /&gt;#define STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_TYPENAME_TYPE_RET_KEYWORD_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_TEMPLATE_QUALIFIER_KEYWORD_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ /* #define STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT */&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_ADL_LOOKUP_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_TEMPLATE_TEMPLATE_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_VENEER_SUPPORT&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_ALLOCATOR_BASE_EXPENSIVE&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_COMPILER_WARNS_NO_PUBLIC_DTOR&lt;br /&gt;&lt;br /&gt;/* Shims are supported?&lt;br /&gt; */&lt;br /&gt;/* #define STLSOFT_CF_TEMPLATE_SHIMS_NOT_SUPPORTED */&lt;br /&gt;&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT&lt;br /&gt;/* !!! Assumed. Not yet verified !!! */ #define STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT&lt;br /&gt;&lt;br /&gt;#if defined(_STLSOFT_CUSTOM_ASSERT)&lt;br /&gt; /* You have defined the pre-processor symbol _STLSOFT_CUSTOM_ASSERT,&lt;br /&gt;  * which stipulates that you will be providing your own assert. This&lt;br /&gt;  * requires that you have defined _STLSOFT_CUSTOM_ASSERT() as a macro&lt;br /&gt;  * taking 1 parameter (the condition to assert).&lt;br /&gt;  *&lt;br /&gt;  * Suppose you have a function _DisplayAssert(), which has the&lt;br /&gt;  * following signature:&lt;br /&gt;  *&lt;br /&gt;  *   void _DisplayAssert(char const* file, int line, char const* expression);&lt;br /&gt;  *&lt;br /&gt;  * Presumably you would also have your own assert macro, say MY_ASSERT(),&lt;br /&gt;  * defined as:&lt;br /&gt;  *&lt;br /&gt;  *   #define MY_ASSERT(_x) ((void)((!(_x)) ? ((void)(_DisplayAssert(__FILE__, __LINE__, #_x))) : ((void)0)))&lt;br /&gt;  *&lt;br /&gt;  * so you would simply need to define _STLSOFT_CUSTOM_ASSERT() in terms of&lt;br /&gt;  * MY_ASSERT(), as in:&lt;br /&gt;  *&lt;br /&gt;  *  #define _STLSOFT_CUSTOM_ASSERT(_x)    MY_ASSERT(_x)&lt;br /&gt;  *&lt;br /&gt;  * where&lt;br /&gt;  */&lt;br /&gt;# define __STLSOFT_CF_ASSERT_SUPPORT&lt;br /&gt;# define STLSOFT_CF_ASSERT_SUPPORT&lt;br /&gt;# define STLSOFT_ASSERT(_x)                     _STLSOFT_CUSTOM_ASSERT(_x)&lt;br /&gt;# if defined(_STLSOFT_CUSTOM_ASSERT_INCLUDE)&lt;br /&gt;#  define   __STLSOFT_CF_ASSERT_INCLUDE_NAME    _STLSOFT_CUSTOM_ASSERT_INCLUDE&lt;br /&gt;# else&lt;br /&gt;#  error You must define _STLSOFT_CUSTOM_ASSERT_INCLUDE along with _STLSOFT_CUSTOM_ASSERT()&lt;br /&gt;# endif /* !_STLSOFT_CUSTOM_ASSERT_INCLUDE */&lt;br /&gt;#else /* ? _STLSOFT_CUSTOM_ASSERT */&lt;br /&gt;# define __STLSOFT_CF_ASSERT_SUPPORT&lt;br /&gt;# define STLSOFT_CF_ASSERT_SUPPORT&lt;br /&gt;/* # define   __STLSOFT_CF_USE_cassert */&lt;br /&gt;# define __STLSOFT_CF_ASSERT_INCLUDE_NAME       &amp;lt;assert.h&gt;&lt;br /&gt;# define STLSOFT_ASSERT(_x)                     assert(_x)&lt;br /&gt;#endif /* _STLSOFT_CUSTOM_ASSERT */&lt;br /&gt;&lt;br /&gt;/* /////////////////////////////////////////////////////////////////////////&lt;br /&gt; * Calling convention&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;#define STLSOFT_CF_CDECL_SUPPORTED&lt;br /&gt;&lt;br /&gt;#ifdef STLSOFT_CF_CDECL_SUPPORTED&lt;br /&gt;# define STLSOFT_CDECL&lt;br /&gt;#endif /* STLSOFT_CF_CDECL_SUPPORTED */&lt;br /&gt;&lt;br /&gt;/* /////////////////////////////////////////////////////////////////////////&lt;br /&gt; * Inline assembler&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;/* #define STSLSOFT_INLINE_ASM_SUPPORTED */&lt;br /&gt;/* #define STSLSOFT_ASM_IN_INLINE_SUPPORTED */&lt;br /&gt;&lt;br /&gt;/* /////////////////////////////////////////////////////////////////////////&lt;br /&gt; * inline support&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;#define STLSOFT_CF_C99_INLINE&lt;br /&gt;&lt;br /&gt;/* /////////////////////////////////////////////////////////////////////////&lt;br /&gt; * If &amp;lt;cwchar&gt; gets included after &amp;lt;stdio.h&gt; or &amp;lt;cstdio&gt; then it fails to&lt;br /&gt; * declare mbstate_t and various wchar functions, so include it now to try&lt;br /&gt; * and reduce problem (too late if &amp;lt;stdio.h&gt; has already been included.)&lt;br /&gt; * http://forum.java.sun.com/thread.jspa?messageID=10035724&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;#ifdef STLSOFT_LINUX_STDIO_ORDER_BUG&lt;br /&gt;# ifdef __cplusplus&lt;br /&gt;#  include &amp;lt;cwchar&gt;&lt;br /&gt;# endif /* __cplusplus */&lt;br /&gt;#endif /* STLSOFT_LINUX_STDIO_ORDER_BUG */&lt;br /&gt;&lt;br /&gt;/* /////////////////////////////////////////////////////////////////////////&lt;br /&gt; * Compiler warning suppression&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;/* /////////////////////////////////////////////////////////////////////////&lt;br /&gt; * Helper definitions&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;#undef _STLSOFT_SUNPRO_VER_&lt;br /&gt;#undef _STLSOFT_SUNPRO_VER_MAJOR&lt;br /&gt;#undef _STLSOFT_SUNPRO_VER_MINOR&lt;br /&gt;&lt;br /&gt;/* ////////////////////////////////////////////////////////////////////// */&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I hope that's clear. ;-)&lt;br /&gt;&lt;br /&gt;In the next post I'll discuss the other changes required to get Pantheios built with the -library=libCstd&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-6704446164457619710?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/6704446164457619710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=6704446164457619710' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/6704446164457619710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/6704446164457619710'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/04/sun-pro-cc-compatibility-with-1933-step.html' title='Sun Pro C/C++ compatibility with 1.9.33: step 1'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-1057658559314753771</id><published>2008-04-14T21:17:00.001-07:00</published><updated>2008-04-14T23:38:44.981-07:00</updated><title type='text'>Fit vs Fat</title><content type='html'>No, this has nothing to do with my ongoing exploits in eeking out greater and greater performance of my aging hulk.&lt;br /&gt;&lt;br /&gt;Rather, it's about an approach to library design that errs on the side of providing the minimum possible, rather than the maximum potential permutations of functionality.&lt;br /&gt;&lt;br /&gt;Of course, age, learning, evolving paradigms, and backwards-compatibility all tend to result in accretion of functionality. And there's nothing going to happen in 1.9.x to start removing code. But as of 1.10 I'd like to rewrite several popular libraries to address the crustification.&lt;br /&gt;&lt;br /&gt;To guide me in this, I'm looking for users to write in and make their complaints/requests.&lt;br /&gt;&lt;br /&gt;Obvious (to me) candidates for face-lifts include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;FileSystem Library&lt;/li&gt;&lt;li&gt;System Library&lt;/li&gt;&lt;li&gt;&lt;a href="http://stlsoft.org/doc-1.9/group__group____library____windows__registry.html"&gt;Windows Registry Library&lt;/a&gt; (see include/winstl/registry/*)&lt;/li&gt;&lt;li&gt;Windows Controls&lt;/li&gt;&lt;li&gt;Error Library (in fact this is &lt;a href="http://stlsoft-musings.blogspot.com/2008/04/stlsoft-1931-released.html"&gt;already happening&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;a href="http://stlsoft.org/doc-1.9/group__group____library____containers.html"&gt;Containers Library&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://stlsoft.org/doc-1.9/group__group____library____string.html"&gt;String Library&lt;/a&gt; (see &lt;a href="http://stlsoft-musings.blogspot.com/2008/04/staticstring-semantics-redux.html"&gt;this post&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Do you have any more? If so, please let me know, either here or on the &lt;a href="http://www.digitalmars.com/webnews/newsgroups.php?search_txt=&amp;amp;group=c%2B%2B.stlsoft"&gt;STLSoft newsgroup&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-1057658559314753771?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/1057658559314753771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=1057658559314753771' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1057658559314753771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/1057658559314753771'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/04/fit-vs-fat.html' title='Fit vs Fat'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-2503267405239425899</id><published>2008-04-14T20:37:00.000-07:00</published><updated>2008-04-14T20:57:10.827-07:00</updated><title type='text'>static_string semantics redux</title><content type='html'>I'm currently using &lt;span style="font-family:courier new;"&gt;stlsoft::static_string&lt;/span&gt; to test the soon-to-be-released &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt; library. (&lt;span style="font-size:85%;"&gt;btw, if you're a user/reader of mine, you're probably heartily sick of the phrase "soon-to-be-released", I hear ya!&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;static_string&lt;/span&gt; is a &lt;span style="font-family:courier new;"&gt;std::string&lt;/span&gt;-like string class that has a fixed internal buffer. It relies on contracts to force on the user respect for its limitations, to whit you may not attempt to cause the string contents to exceed the internal size.&lt;br /&gt;&lt;br /&gt;That's all very well and good, as it's clear. What's probably not so cool is that people tend not to either grok, or want to respect, the principles of contract programming.&lt;br /&gt;&lt;br /&gt;So it's occuring to me that &lt;span style="font-family:courier new;"&gt;static_string&lt;/span&gt; should evolve for STLSoft 1.10 and change its contracts from "&lt;em&gt;you may not try to expand me beyond my capacity limit&lt;/em&gt;" to "&lt;em&gt;if you try and expand me beyond my capacity limit&lt;/em&gt;" I will inform you (by an exception).&lt;br /&gt;&lt;br /&gt;There's another evolution that would be good, and that's one that would be able to work atop an &lt;em&gt;external&lt;/em&gt; character buffer. But that brings the notion of policy classes into play, and they &lt;strong&gt;suck&lt;/strong&gt; in general.&lt;br /&gt;&lt;br /&gt;So, I'm starting to think that we'll have either a separate class (template), or a base utility template that gets specialised in two different ways by, say, &lt;span style="font-family:courier new;"&gt;static_string&lt;/span&gt; and &lt;span style="font-family:courier new;"&gt;external_string&lt;/span&gt; class templates.&lt;br /&gt;&lt;br /&gt;Watch this space ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-2503267405239425899?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/2503267405239425899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=2503267405239425899' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2503267405239425899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/2503267405239425899'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/04/staticstring-semantics-redux.html' title='static_string semantics redux'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-5786821985207288809</id><published>2008-04-12T23:48:00.001-07:00</published><updated>2008-04-14T20:37:27.894-07:00</updated><title type='text'>STLSoft 1.10 preview</title><content type='html'>There're several things that've been waiting to go into the 1.10 release for quite a while - some over 2 years! - and it's beyond ridiculous.&lt;br /&gt;&lt;br /&gt;So, from the end of this week onwards, I'm going to make a preview release of the next version of the library available alongside the &lt;a href="http://stlsoft.org/downloads.html"&gt;main release&lt;/a&gt;. The first version of this will contain only the &lt;span style="font-family:courier new;"&gt;platformstl::properties_file&lt;/span&gt; component, whic his needed for the soon-to-be-released alpha release of the much-delayed &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt; library.&lt;br /&gt;&lt;br /&gt;This simple but sophisticated properties file reader class provides a non-mutable vector&lt;string&gt; like interface, along the following lines:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;class &lt;span style="FONT-WEIGHT: bold"&gt;properties_file&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public: &lt;/span&gt;&lt;span style="COLOR: rgb(0,153,0);font-family:courier new;" &gt;/// Member Types&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;typedef stlsoft::string_view view_type;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;typedef values_map_type::value_type value_type;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;typedef values_map_type::const_iterator const_iterator;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;typedef size_t size_type;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public: &lt;/span&gt;&lt;span style="COLOR: rgb(0,153,0);font-family:courier new;" &gt;/// Construction&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;explicit &lt;span style="FONT-WEIGHT: bold"&gt;properties_file&lt;/span&gt;(char const* fileName);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public: &lt;/span&gt;&lt;span style="COLOR: rgb(0,153,0);font-family:courier new;" &gt;/// Accessors&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;view_type &lt;span style="FONT-WEIGHT: bold"&gt;operator []&lt;/span&gt;(char const* propertyName) const;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;size_type &lt;span style="FONT-WEIGHT: bold"&gt;size&lt;/span&gt;() const;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;const_iterator &lt;span style="FONT-WEIGHT: bold"&gt;begin&lt;/span&gt;() const;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;const_iterator &lt;span style="FONT-WEIGHT: bold"&gt;end&lt;/span&gt;() const;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;nbsp;&amp;nbsp;. . . &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;};&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The only exotic part of it is the use of &lt;span style="font-family:courier new;"&gt;stlsoft::string_view&lt;/span&gt;, rather than a string value type. I'll discuss this in more depth in a future post; for now you can rest assured that it's to do with not allocating any memory we don't need to. ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-5786821985207288809?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/5786821985207288809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=5786821985207288809' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5786821985207288809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/5786821985207288809'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/04/stlsoft-110-preview.html' title='STLSoft 1.10 preview'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-6225589635288458871</id><published>2008-04-12T23:38:00.000-07:00</published><updated>2008-04-12T23:44:45.832-07:00</updated><title type='text'>STLSoft 1.9.31 released</title><content type='html'>This &lt;a href="http://stlsoft.org/downloads.html#stlsoft_1_9_31"&gt;release&lt;/a&gt; includes some refactoring of the exception hierarchy of the main project (&lt;span style="font-family: verdana;"&gt;STLSoft&lt;/span&gt;) and several sub-projects (&lt;span style="font-family: verdana;"&gt;COMSTL&lt;/span&gt;, &lt;span style="font-family: verdana;"&gt;UNIXSTL&lt;/span&gt; and &lt;span style="font-family: verdana;"&gt;WinSTL&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;The root exception used to be &lt;span style="font-family: courier new;"&gt;stlsoft::os_exception&lt;/span&gt;, as a nod to the fact that the two main sub-projects - &lt;span style="font-family: verdana;"&gt;UNIXSTL&lt;/span&gt; and &lt;span style="font-family: verdana;"&gt;WinSTL&lt;/span&gt; - are STL extensions over UNIX and Windows APIs. However, that's never seemed to sit comfortably, so this is now changes. The root exception is &lt;span style="font-family: courier new;"&gt;stlsoft::project_exception&lt;/span&gt;, from which &lt;span style="font-family: courier new;"&gt;stlsoft::os_exception&lt;/span&gt; derives.&lt;br /&gt;&lt;br /&gt;The exceptions in &lt;span style="font-family: verdana;"&gt;UNIXSTL&lt;/span&gt; and &lt;span style="font-family: verdana;"&gt;WinSTL&lt;/span&gt; continue to derive from &lt;span style="font-family: courier new;"&gt;stlsoft::os_exception&lt;/span&gt;, but those of &lt;span style="font-family: verdana;"&gt;COMSTL&lt;/span&gt; now derive direct from &lt;span style="font-family: courier new;"&gt;stlsoft::project_exception&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Coming up&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;This refactoring underpins further refactoring around exception/error handling, in the Windows Registry library in particular, which itself will underpin functional enhancements to that library (originally requested (and implemented) by Austin Ziegler). This stuff's likely to appear in 1.9.33&lt;br /&gt;&lt;br /&gt;The next release (1.9.32) is likely to contain compatibility fixes for SunStudio (on Intel at first; the Solaris stuff's likely to be another week or so).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-6225589635288458871?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/6225589635288458871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=6225589635288458871' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/6225589635288458871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/6225589635288458871'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/04/stlsoft-1931-released.html' title='STLSoft 1.9.31 released'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8628867397165078694.post-3826758087923899143</id><published>2008-04-12T06:11:00.000-07:00</published><updated>2008-04-12T06:19:48.370-07:00</updated><title type='text'>Kicking it off, I suppose</title><content type='html'>Well, I've created the blog, so I guess I'd better put something up.&lt;br /&gt;&lt;br /&gt;I'm still fighting with the time/invention conundrum: too many things to do and too little time.&lt;br /&gt;&lt;br /&gt;At the moment, I'm engaged (as I have been for 18 months) in getting &lt;a href="http://pantheios.org/"&gt;Pantheios&lt;/a&gt; to non-beta status, getting a first public &lt;a href="http://fastformat.org/"&gt;FastFormat&lt;/a&gt;, and a whole of other things.&lt;br /&gt;&lt;br /&gt;As for &lt;a href="http://stlsoft.org/"&gt;STLSoft&lt;/a&gt; itself, there're a few things waiting to be added, in particular the Solaris/SunStudio compatibility that &lt;a href="http://www.redi.uklinux.net/"&gt;Jon Wakely&lt;/a&gt; and some other users have been asking for. As I've not yet got my Solaris box set up, or SunStudio successfully installed on the Ubuntu 64 box, I'm probably going to have to take a punt and go with adding in the partially complete SunStudio support that my Pantheios users have kindly added into STLSoft. But this is probably better than making other users wait much longer. Such are the quandaries ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8628867397165078694-3826758087923899143?l=blog.stlsoft-musings.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.stlsoft-musings.net/feeds/3826758087923899143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8628867397165078694&amp;postID=3826758087923899143' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3826758087923899143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8628867397165078694/posts/default/3826758087923899143'/><link rel='alternate' type='text/html' href='http://blog.stlsoft-musings.net/2008/04/kicking-it-off-i-suppose.html' title='Kicking it off, I suppose'/><author><name>Matt Wilson</name><uri>http://www.blogger.com/profile/08032564940029177259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
