Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 394347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:20:49+00:00 2026-05-12T16:20:49+00:00

I was wondering about using or not templates, in other thread I found out

  • 0

I was wondering about using or not templates, in other thread I found out that templates must be implement in the header file because of some reasons.
Thats ok, my question is if the source will be need if other programm use it?
from the logic of the other thread’s answer, it seems that even other programm would need the full implementation so the compiler can say if a line can or not use the templated function.

if yes, I guess templates are not a good thing for the developer who wants others to use his library?
if no, then we are good and templates will be used.

or if at least there is anyway to save my hard, hours spent, code from others?

(I will use stl vectors and such, but I am asking for my own code… Templates seem to be nice, save you a lot of hardcoded lines or macro abusing, but if others can read your source than it makes almost no sense[lot of sense to open projects xD])

Thanks,
Joe

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T16:20:49+00:00Added an answer on May 12, 2026 at 4:20 pm

    If you want users of your library to be able to use your templates, their source code needs to be available to those users.

    However you can sometimes design your template classes so that most of the logic happens in non-template classes which don’t have the full source code in the headers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wondering about using the abstraction in Zend Db RowSet instead of joins,
I was wondering about how saving variables work by using SharedPreferences inside onStop() function.
I was wondering about the different ways of using a JQuery function on a
I am learning about using the checkmark cell accessory and am wondering why the
I'm using the webwork framework (JIRA plugin development) and was wondering about the lifecycle
I read an article about using CLR integration in sqlserver and was wondering what
Something I have been wondering about properties for a while. When you are using
I'm looking into using parallel unit tests for our project(s) and was wondering about
I'm new to creating installers using Visual Studio, and was wondering about the Global
I am using .Net3.5. Just wondering my understanding about the insert, update, delete are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.