<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: S-expressions and variant</title>
	<atom:link href="http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/feed/" rel="self" type="application/rss+xml" />
	<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=s-expressions-and-variants</link>
	<description>Home of The Boost.Spirit Library</description>
	<lastBuildDate>Wed, 25 Jan 2012 14:26:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Joel de Guzman</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-28899</link>
		<dc:creator>Joel de Guzman</dc:creator>
		<pubDate>Mon, 30 May 2011 06:44:10 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-28899</guid>
		<description>1) size constraints. std::list is 16 bytes last I checked (32 bit compiler) 2) I needed to keep the elements in the variant PODs to simplify the implementation. It&#039;s a lot easier this way than having to rewrite variant for our very tuned and specific application.</description>
		<content:encoded><![CDATA[<p>1) size constraints. std::list is 16 bytes last I checked (32 bit compiler) 2) I needed to keep the elements in the variant PODs to simplify the implementation. It&#8217;s a lot easier this way than having to rewrite variant for our very tuned and specific application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olaf</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-28897</link>
		<dc:creator>Olaf</dc:creator>
		<pubDate>Mon, 30 May 2011 06:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-28897</guid>
		<description>Only for interest: Why do you wrote your own list implementation and don&#039;t use std::list? Why is there no allocator interface like the std::list has which would allow to use pools, e.g. boost&#039;s fast_pool_allocator? Would be any benefit from them?</description>
		<content:encoded><![CDATA[<p>Only for interest: Why do you wrote your own list implementation and don&#8217;t use std::list? Why is there no allocator interface like the std::list has which would allow to use pools, e.g. boost&#8217;s fast_pool_allocator? Would be any benefit from them?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel de Guzman</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-27862</link>
		<dc:creator>Joel de Guzman</dc:creator>
		<pubDate>Tue, 17 May 2011 09:16:26 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-27862</guid>
		<description>Optionals are just T &#124; nil
utree is inherently recursive</description>
		<content:encoded><![CDATA[<p>Optionals are just T | nil<br />
utree is inherently recursive</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olaf</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-27850</link>
		<dc:creator>Olaf</dc:creator>
		<pubDate>Tue, 17 May 2011 05:32:23 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-27850</guid>
		<description>How can I handle optional, even rekursive??</description>
		<content:encoded><![CDATA[<p>How can I handle optional, even rekursive??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xavi Gratal</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-9752</link>
		<dc:creator>Xavi Gratal</dc:creator>
		<pubDate>Fri, 22 Oct 2010 18:32:43 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-9752</guid>
		<description>That looks good. I will certainly have a use for this. 
But I have a concern... isn&#039;t storing members of a union as one type and then reading them as another forbidden by the standard. IIRC it breaks the strict-aliasing rule, and it can cause problems with certain compilers that do optimization taking advantage of the aliasing rules.
It would probably be better to store it as an unsigned char array and then cast as needed (casting to and from char pointers is allowed by the standard).</description>
		<content:encoded><![CDATA[<p>That looks good. I will certainly have a use for this.<br />
But I have a concern&#8230; isn&#8217;t storing members of a union as one type and then reading them as another forbidden by the standard. IIRC it breaks the strict-aliasing rule, and it can cause problems with certain compilers that do optimization taking advantage of the aliasing rules.<br />
It would probably be better to store it as an unsigned char array and then cast as needed (casting to and from char pointers is allowed by the standard).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dainis</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-7519</link>
		<dc:creator>Dainis</dc:creator>
		<pubDate>Thu, 16 Sep 2010 01:33:32 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-7519</guid>
		<description>Thanks Hartmut, that works, just now I understand that if 
utree is constructed as list , only makes a sense  to construct it as list of 
of utrees ;-)</description>
		<content:encoded><![CDATA[<p>Thanks Hartmut, that works, just now I understand that if<br />
utree is constructed as list , only makes a sense  to construct it as list of<br />
of utrees <img src='http://boost-spirit.com/home/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hartmut Kaiser</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-7491</link>
		<dc:creator>Hartmut Kaiser</dc:creator>
		<pubDate>Wed, 15 Sep 2010 13:10:45 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-7491</guid>
		<description>utree has an additional constructor (not shown in the listing above) taking a boost::iterator_range:
[cpp]
        template &lt;typename Iter&gt;
        utree(boost::iterator_range&lt;Iter&gt; r);
[/cpp]
which should do what you want.

Regrads Hartmut</description>
		<content:encoded><![CDATA[<p>utree has an additional constructor (not shown in the listing above) taking a boost::iterator_range:</p>
<pre class="brush: cpp; title: ; notranslate">
        template &lt;typename Iter&gt;
        utree(boost::iterator_range&lt;Iter&gt; r);
</pre>
<p>which should do what you want.</p>
<p>Regrads Hartmut</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dainis</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-7488</link>
		<dc:creator>Dainis</dc:creator>
		<pubDate>Wed, 15 Sep 2010 12:44:43 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-7488</guid>
		<description>Sorry on more time I have lost &lt; &gt; ,  
std::list&lt;int &gt;   or std::vector&lt;int &gt;  or maybe scheme::detail::list  on one line say
scheme::utree  my_utree( std::vector&lt;int &gt;(21) );
I spend 3 hours to quess right syntax, but no results...,
only errors like ...
C:\csource\utree\test.cpp:117: error: no matching function for call to &#039;scheme::utree::utree(scheme::detail::list&amp;)&#039;
C:\csource\utree\detail/utree_detail2.hpp:979: note: candidates are: scheme::utree::utree(scheme::utree::construct_list)</description>
		<content:encoded><![CDATA[<p>Sorry on more time I have lost &lt; &gt; ,<br />
std::list&lt;int &gt;   or std::vector&lt;int &gt;  or maybe scheme::detail::list  on one line say<br />
scheme::utree  my_utree( std::vector&lt;int &gt;(21) );<br />
I spend 3 hours to quess right syntax, but no results&#8230;,<br />
only errors like &#8230;<br />
C:\csource\utree\test.cpp:117: error: no matching function for call to &#8216;scheme::utree::utree(scheme::detail::list&amp;)&#8217;<br />
C:\csource\utree\detail/utree_detail2.hpp:979: note: candidates are: scheme::utree::utree(scheme::utree::construct_list)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dainis</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-7487</link>
		<dc:creator>Dainis</dc:creator>
		<pubDate>Wed, 15 Sep 2010 12:29:56 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-7487</guid>
		<description>Sorry for maybe dumb question, is possible to construct utree as list  from 
std::list   or std::vector  or maybe scheme::detail::list  on one line say
scheme::utree  my_utree( std::vector(21) );
I spend 3 hours to quess right syntax, but no results...,
only errors like ...
C:\csource\utree\test.cpp:117: error: no matching function for call to &#039;scheme::utree::utree(scheme::detail::list&amp;)&#039;
C:\csource\utree\detail/utree_detail2.hpp:979: note: candidates are: scheme::utree::utree(scheme::utree::construct_list)</description>
		<content:encoded><![CDATA[<p>Sorry for maybe dumb question, is possible to construct utree as list  from<br />
std::list   or std::vector  or maybe scheme::detail::list  on one line say<br />
scheme::utree  my_utree( std::vector(21) );<br />
I spend 3 hours to quess right syntax, but no results&#8230;,<br />
only errors like &#8230;<br />
C:\csource\utree\test.cpp:117: error: no matching function for call to &#8216;scheme::utree::utree(scheme::detail::list&amp;)&#8217;<br />
C:\csource\utree\detail/utree_detail2.hpp:979: note: candidates are: scheme::utree::utree(scheme::utree::construct_list)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel de Guzman</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-7462</link>
		<dc:creator>Joel de Guzman</dc:creator>
		<pubDate>Tue, 14 Sep 2010 22:57:06 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-7462</guid>
		<description>Well, it will be a list, so you&#039;ll also need 2 linked-list pointers per element. I&#039;m considering some optimizations though for small lists that will give you a better memory footprint.</description>
		<content:encoded><![CDATA[<p>Well, it will be a list, so you&#8217;ll also need 2 linked-list pointers per element. I&#8217;m considering some optimizations though for small lists that will give you a better memory footprint.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

