
All,
I have a question with regards more to the C++ than Boost.
I would like to write a template which depending on the argument type
does different things.
For example the pseudo code:
template

Sliwa, Przemyslaw (London) wrote:
I would like to write a template which depending on the argument type does different things.
For example the pseudo code:
template
foo(T& nT, C& nC) { // common code; if(T==C) // specific code; ..... // again common code; }
Can the template meta programming help me in this case?
It may. It depends on whether "specific code" compiles when T!=C. If it
does, you could do this:
template
participants (2)
-
Eric Niebler
-
Sliwa, Przemyslaw (London)