Re: Linkers, etc, and Object Code Templatey-Type-Things?

Paul Pluzhnikov <ppluzhnikov@charter.net>
4 Feb 2004 21:28:48 -0500

          From comp.compilers

Related articles
Linkers, etc, and Object Code Templatey-Type-Things? s.g.best@btopenworld.com (Simon G Best) (2004-02-01)
Re: Linkers, etc, and Object Code Templatey-Type-Things? ppluzhnikov@charter.net (Paul Pluzhnikov) (2004-02-04)
Re: Linkers, etc, and Object Code Templatey-Type-Things? s.g.best@btopenworld.com (Simon G Best) (2004-02-08)
Re: Linkers, etc, and Object Code Templatey-Type-Things? cdodd@acm.org (Chris Dodd) (2004-02-08)
| List of all articles for this month |

From: Paul Pluzhnikov <ppluzhnikov@charter.net>
Newsgroups: comp.compilers
Date: 4 Feb 2004 21:28:48 -0500
Organization: Posted via Supernews, http://www.supernews.com
References: 04-02-012
Keywords: linker
Posted-Date: 04 Feb 2004 21:28:48 EST

Simon G Best <s.g.best@btopenworld.com> writes:


> Do such linkers / object file formats exist?


They don't, and for C++ they are impossible (I think).
Consider:


    template <typename T>
    void assign(const T &rhs)
    {
            this->someField = rhs;
    }


What kind of object code can compiler generate here?


Well, it depends on what 'T' is: for an 'int', a 'double', a class
with 'operator=', and a class without 'op=' but containing instance
variables with 'op=', compiler will have to generate *very* different
object code.


Cheers,


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.