Results 1 to 4 of 4

Thread: What's the reason for mentioning the <T> in the definition of a template member

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: What's the reason for mentioning the <T> in the definition of a template member

    yes, that is what I meant.
    When you define a calss template, you need to specify the template type when us initialize the template.
    You could get rid of the class template deceleration and have a non template class, which has only template functions, then you don't need to specify the template type on the class level.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  2. The following user says thank you to high_flyer for this useful post:

    rawfool (21st November 2017)

Similar Threads

  1. Replies: 2
    Last Post: 10th October 2014, 09:49
  2. pass member function as argument int template function
    By bibhukalyana in forum General Programming
    Replies: 1
    Last Post: 12th March 2013, 07:05
  3. Replies: 2
    Last Post: 28th March 2012, 21:47
  4. Replies: 2
    Last Post: 20th October 2011, 15:14
  5. Replies: 3
    Last Post: 19th February 2008, 13:10

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.