|
Boost Users : |
From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2005-05-20 21:58:20
On 5/19/05, Gottlob Frege <gottlobfrege_at_[hidden]> wrote:
[snip]
>
> template <typename T> class C
> {
> int fooCount()
> {
> static int foo = 0;
> return ++foo;
> }
> };
>
[snip]
>
> I suppose a compiler could still make the code common, but with
> separate static foo's, but then in general, there is nothing stopping
> a compiler from looking at 2 unrelated functions and saying, 'hey,
> lots of the code here looks the same; I should just refactor some of
> it out and remove some code bloat'. Not sure much of that ever
> happens. Reality is that once upon a time there were compiler
> switches for size vs speed, but speed won.
>
I have one question:
Isnt &C<int>::fooCount garanteed to be different from &C<long>::fooCount ?
[snip]
>
> Tony
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
-- Felipe Magno de Almeida UIN: 2113442 email: felipe.m.almeida+spam at gmail com felipe.almeida+spam at ic unicamp br, felipe.m.almeida at gmail com, felipe+spam at synergy com (Remove the +spam from the email) I am a C, modern C++, MFC, ODBC, Windows Services, MAPI developer from synergy, and Computer Science student from State University of Campinas(UNICAMP). To know more about: Unicamp: http://www.ic.unicamp.br Synergy: http://www.synergy.com.br current work: http://www.mintercept.com "There is no dark side of the moon really. Matter of fact it's all dark."
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net