Disabling a function definition

E

er

Hi All,
Here's an dilemma:

I used to have some code like this:

template<int i>
void f(){};

but now I found out how to do away with the template parameter:

void f(){};

However, I don't want to rewrite the old code I have that depends on
the first definition, while being able to use the new definition in
the new code. I don't think I can have it both ways, but perhaps
someone else has thought of this before me.
 
V

Victor Bazarov

er said:
Here's an dilemma:

I used to have some code like this:

template<int i>
void f(){};

but now I found out how to do away with the template parameter:

void f(){};

However, I don't want to rewrite the old code I have that depends on
the first definition, while being able to use the new definition in
the new code. I don't think I can have it both ways, but perhaps
someone else has thought of this before me.

Have you tried just having them both? If yes, what happened? If not,
why not?

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top