CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Jun 2012
    Posts
    58

    Resolved template classes and inline methods

    hi,

    i have a template class which defines a few heavy methods. For now, they are defined in the same .h file as the class definition, but i`d like to have them in a separate .cpp file.
    A situation i find you describe in the FAQs arises:

    http://forums.codeguru.com/showthrea...-template-code

    Problem: the export keyword has been deprecated in c++0x, if i recall correctly, and has never been implemented in any of the compilers i am using (msvc, gcc).
    (maybe one could mention that in the FAQ...)

    #Including the the .cpp file after the class definition (as described in the second post of the FAQ) works, but i`m not a huge fan of it.
    Is there any other way?


    another question: i have methods that dont use any template code. Can i somehow declare them as such? (more of an esthecial question, which would make it easier to distinguish between template and non.template code).

    thanks.
    Last edited by tuli; August 23rd, 2012 at 05:59 AM. Reason: tried to mark as solved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured