Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Re: Template pr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 9 Topic 45795 of 47006
Post > Topic >>

Re: Template problems

by Stephan Ceram <linuxkaffee_@[EMAIL PROTECTED] > May 7, 2008 at 05:28 PM

> I wonder, why all those questions?  Did it have anything to do
> with the problem the OP experienced?  Generally speaking, the
> link error (this is what the OP's got, isn't it?) is because it
> is a function template that is used in 'main' and its source is
> not visible so that the compiler can generate the function.  But
> the design has really nothing to do with it, does it?  Simply
> tell the OP to place the definition in the header.

That's my point. But when I place the definition into the header
which I want to make visible to other users as API to my library,
also the definition of A::func becomes visible to everyone. And
this is what I would like to avoid. This was the reason of my post
to ask you if there are any solution to not change the semantics
of my code example but still somehow keep the definition of A::func
hidden.

Regards,
 




 9 Posts in Topic:
Template problems
Tim Frink <plfriko@[EM  2008-05-07 16:04:49 
Re: Template problems
"sk_usenet" <  2008-05-07 09:35:09 
Re: Template problems
Puppet_Sock <puppet_so  2008-05-07 09:39:05 
Re: Template problems
"Victor Bazarov"  2008-05-07 12:58:24 
Re: Template problems
Stephan Ceram <linuxka  2008-05-07 17:28:44 
Re: Template problems
"Victor Bazarov"  2008-05-07 13:41:35 
Re: Template problems
Joe Greer <jgreer@[EMA  2008-05-07 21:08:27 
Re: Template problems
Tim Frink <plfriko@[EM  2008-05-07 21:51:07 
Re: Template problems
Joe Greer <jgreer@[EMA  2008-05-08 20:17:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 1:56:41 CDT 2008.