Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Class template support in XS

by bipham (Novice)
on Mar 16, 2012 at 01:57 UTC ( [id://959896]=perlquestion: print w/replies, xml ) Need Help??

bipham has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, I am planning to use C++ template for both classes and functions and plan to convert them to Perl using XS. I was just wondering if XS will be able to handle C++ template? Would you please help? Thank you,

Replies are listed 'Best First'.
Re: Class template support in XS
by GrandFather (Saint) on Mar 16, 2012 at 04:41 UTC

    What do you mean by "convert them to Perl"?

    XS is essentially a bunch of extern C bindings for your code. By the time your template using source has been compiled and linked the templates have vanished and there is nothing template related for the Perl side code to know about.

    True laziness is hard work
      Hi, What I was talking about is the generic function/class support in XS? It somehow gives me a lot of error when compiled.

        Were you using a C++ compiler? Actually, judging by the questions you are asking I suspect you are trying to run before you can roll over. Have you worked through the perlxstut successfully?

        Note: asking "Is it possible" will get different answers than "How do I" or "I have this problem ...".

        True laziness is hard work

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://959896]
Approved by davido
Front-paged by davido
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-19 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found