<?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: Reverse std::binary_function parameters</title>
	<atom:link href="http://www.jeffhung.net/blog/articles/jeffhung/571/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeffhung.net/blog/articles/jeffhung/571/</link>
	<description>(My smile insists of having nose. :-)</description>
	<lastBuildDate>Thu, 03 Nov 2011 00:43:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2-alpha</generator>
	<item>
		<title>By: fr3@K</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/571/comment-page-1/#comment-62192</link>
		<dc:creator>fr3@K</dc:creator>
		<pubDate>Thu, 14 Jun 2007 12:20:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.net/blog/articles/jeffhung/571/#comment-62192</guid>
		<description>啊~~ 了解~~</description>
		<content:encoded><![CDATA[<p>啊~~ 了解~~</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeffhung</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/571/comment-page-1/#comment-62187</link>
		<dc:creator>jeffhung</dc:creator>
		<pubDate>Thu, 14 Jun 2007 11:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.net/blog/articles/jeffhung/571/#comment-62187</guid>
		<description>從 C 到 C++，確實要跨很大一步。XD</description>
		<content:encoded><![CDATA[<p>從 C 到 C++，確實要跨很大一步。XD</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fr3@K</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/571/comment-page-1/#comment-62163</link>
		<dc:creator>fr3@K</dc:creator>
		<pubDate>Thu, 14 Jun 2007 10:04:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.net/blog/articles/jeffhung/571/#comment-62163</guid>
		<description>Jeff,

&gt; 很想用，但也要部門裡所有人都看得懂才行啊

那是不是也不用 C++ Standard Library 呢？ 不太可能吧. 我個人覺得從 C++ Standard Library 到 Boost 的確有一道溝, 但也沒有要跨那麼大的一步.

在 99% 的情況下, 用這兩個高品質的 library 會比使用你我手工打造的東西更高效率與 error free.

看不懂就給他些自學 pointer, 自學不會就教, 教不會就輔導改行 (從軟體工程師轉行為軟體作業員?) :P

&gt; 再加上「porting 到 embedded system 上出問題怎麼解」

其他 (embedded system 上的) software 出了問題怎麼辦? 如果是 FOSS 還有機會看看 source code 自己修修看. 也可以求助於 mailing list/irc and/or fill bug report. 其實我不是很確定你的這句話的意思, 上面這些方法不適用於 Boost 嗎? 好奇中.</description>
		<content:encoded><![CDATA[<p>Jeff,</p>
<p>&gt; 很想用，但也要部門裡所有人都看得懂才行啊</p>
<p>那是不是也不用 C++ Standard Library 呢？ 不太可能吧. 我個人覺得從 C++ Standard Library 到 Boost 的確有一道溝, 但也沒有要跨那麼大的一步.</p>
<p>在 99% 的情況下, 用這兩個高品質的 library 會比使用你我手工打造的東西更高效率與 error free.</p>
<p>看不懂就給他些自學 pointer, 自學不會就教, 教不會就輔導改行 (從軟體工程師轉行為軟體作業員?) :P</p>
<p>&gt; 再加上「porting 到 embedded system 上出問題怎麼解」</p>
<p>其他 (embedded system 上的) software 出了問題怎麼辦? 如果是 FOSS 還有機會看看 source code 自己修修看. 也可以求助於 mailing list/irc and/or fill bug report. 其實我不是很確定你的這句話的意思, 上面這些方法不適用於 Boost 嗎? 好奇中.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeffhung</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/571/comment-page-1/#comment-62141</link>
		<dc:creator>jeffhung</dc:creator>
		<pubDate>Thu, 14 Jun 2007 08:25:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.net/blog/articles/jeffhung/571/#comment-62141</guid>
		<description>&lt;p&gt;fr3@K,&lt;/p&gt;
&lt;p&gt;感謝分享。&lt;/p&gt;
&lt;p&gt;Boost 啊，真是令人又愛又恨呢&#8230;&#8230;：很想用，但也要部門裡所有人都看得懂才行啊。如果再加上「porting 到 embedded system 上出問題怎麼解」這個問題，那就更麻煩了。唉～&lt;/p&gt;
&lt;p&gt;Jeff Hung&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>fr3@K,</p>
<p>感謝分享。</p>
<p>Boost 啊，真是令人又愛又恨呢&hellip;&hellip;：很想用，但也要部門裡所有人都看得懂才行啊。如果再加上「porting 到 embedded system 上出問題怎麼解」這個問題，那就更麻煩了。唉～</p>
<p>Jeff Hung</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fr3@K</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/571/comment-page-1/#comment-62139</link>
		<dc:creator>fr3@K</dc:creator>
		<pubDate>Thu, 14 Jun 2007 08:14:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.net/blog/articles/jeffhung/571/#comment-62139</guid>
		<description>貼壞了, 還是自己下來看吧. &lt;a href=&quot;http://fsfoundry.org/tmp/lambda-sample.cxx&quot; rel=&quot;nofollow&quot;&gt;Click here&lt;/a&gt; to view source.</description>
		<content:encoded><![CDATA[<p>貼壞了, 還是自己下來看吧. <a href="http://fsfoundry.org/tmp/lambda-sample.cxx" rel="nofollow">Click here</a> to view source.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fr3@K</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/571/comment-page-1/#comment-62136</link>
		<dc:creator>fr3@K</dc:creator>
		<pubDate>Thu, 14 Jun 2007 08:08:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.net/blog/articles/jeffhung/571/#comment-62136</guid>
		<description>參考一下用 &lt;a href=&quot;http://boost.org/doc/html/lambda.html&quot; rel=&quot;nofollow&quot;&gt;Boost.Lambda&lt;/a&gt; 的作法:

&lt;code&gt;
#include 
#include 

using namespace std;

struct digits_printer : public binary_function
{
    void operator()(int lhs, int rhs) const
    {
        cout 
#include 

using namespace boost;
using namespace boost::lambda;

int main()
{
    cout  (4, 3) first.&quot; (digits_printer(), _2, _1)(cref(3), cref(4));
    cout </description>
		<content:encoded><![CDATA[<p>參考一下用 <a href="http://boost.org/doc/html/lambda.html" rel="nofollow">Boost.Lambda</a> 的作法:</p>
<p><code><br />
#include<br />
#include </p>
<p>using namespace std;</p>
<p>struct digits_printer : public binary_function<br />
{<br />
    void operator()(int lhs, int rhs) const<br />
    {<br />
        cout<br />
#include </p>
<p>using namespace boost;<br />
using namespace boost::lambda;</p>
<p>int main()<br />
{<br />
    cout  (4, 3) first." (digits_printer(), _2, _1)(cref(3), cref(4));<br />
    cout</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: av</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/571/comment-page-1/#comment-24461</link>
		<dc:creator>av</dc:creator>
		<pubDate>Thu, 28 Dec 2006 13:42:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.net/blog/articles/jeffhung/571/#comment-24461</guid>
		<description>嗯，的確，如果是以 functor 的入門教學為目的，還是簡單點好，免得嚇跑太多人。強大的 template 已經嚇跑太多人了，不懂得利用 template 真是太可惜了。</description>
		<content:encoded><![CDATA[<p>嗯，的確，如果是以 functor 的入門教學為目的，還是簡單點好，免得嚇跑太多人。強大的 template 已經嚇跑太多人了，不懂得利用 template 真是太可惜了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeffhung</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/571/comment-page-1/#comment-24387</link>
		<dc:creator>jeffhung</dc:creator>
		<pubDate>Thu, 28 Dec 2006 01:03:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.net/blog/articles/jeffhung/571/#comment-24387</guid>
		<description>av,

您好。是的，我有注意到「應該盡可能的抽象化 template code」這個要點。因此，真正要成為 library 給人呼叫的 param_reverser，便會依據給定的 concrete functor，推導出 first_argument_type、second_argument_type 與 result_type 為何。見 param_reverser 如何繼承自 binary_function。

而身為 concrete functor 的 digits_printer，既然只是作為範例程式而存在，因此我也就沒有使其盡可能的彈性了。</description>
		<content:encoded><![CDATA[<p>av,</p>
<p>您好。是的，我有注意到「應該盡可能的抽象化 template code」這個要點。因此，真正要成為 library 給人呼叫的 param_reverser，便會依據給定的 concrete functor，推導出 first_argument_type、second_argument_type 與 result_type 為何。見 param_reverser 如何繼承自 binary_function。</p>
<p>而身為 concrete functor 的 digits_printer，既然只是作為範例程式而存在，因此我也就沒有使其盡可能的彈性了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: av</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/571/comment-page-1/#comment-24348</link>
		<dc:creator>av</dc:creator>
		<pubDate>Wed, 27 Dec 2006 17:55:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.net/blog/articles/jeffhung/571/#comment-24348</guid>
		<description>即然用了 template, 就要盡可能利用它的各種優點，比如說....抽像性! 這邊我指的是型別名稱的抽像概念：
以 digits_printer 來說，我會把你原來寫的
void operator()(int lhs, int rhs) const;
改成
result_type operator()(first_argument_type lhs, second_argument_type);
這樣若你以後改變 template parameter 時，就只要改一個地方了。
看一看....唔，應該用 const&amp; 才對，因此就變成：
result_type operator()(const first_argument_type&amp; lhs, const second_argument_type&amp; rhs);
有點長 :p</description>
		<content:encoded><![CDATA[<p>即然用了 template, 就要盡可能利用它的各種優點，比如說....抽像性! 這邊我指的是型別名稱的抽像概念：<br />
以 digits_printer 來說，我會把你原來寫的<br />
void operator()(int lhs, int rhs) const;<br />
改成<br />
result_type operator()(first_argument_type lhs, second_argument_type);<br />
這樣若你以後改變 template parameter 時，就只要改一個地方了。<br />
看一看....唔，應該用 const&amp; 才對，因此就變成：<br />
result_type operator()(const first_argument_type&amp; lhs, const second_argument_type&amp; rhs);<br />
有點長 :p</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeffhung</title>
		<link>http://www.jeffhung.net/blog/articles/jeffhung/571/comment-page-1/#comment-15237</link>
		<dc:creator>jeffhung</dc:creator>
		<pubDate>Fri, 17 Nov 2006 09:23:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeffhung.net/blog/articles/jeffhung/571/#comment-15237</guid>
		<description>既然用了 OPerator 指涉要被包裹的 functor，是否這個 functor 的名字，改取做 operand_reverser 比較好呢？</description>
		<content:encoded><![CDATA[<p>既然用了 OPerator 指涉要被包裹的 functor，是否這個 functor 的名字，改取做 operand_reverser 比較好呢？</p>
]]></content:encoded>
	</item>
</channel>
</rss>

