class template implementation(!just declaration) must reside in *.h not *.cpp

I used to think that template implementation could reside in *.cpp or *.h — flexible. Now I know it must be in *.h after reading http://www.parashift.com/c++-faq/templates-defn-vs-decl.html

A lot of boost libraries have full source code in *.h files.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s