Click here to Skip to main content
16,010,650 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: help me ,please Pin
Stephen Hewitt19-Nov-06 15:28
Stephen Hewitt19-Nov-06 15:28 
Questionreplacment of CComModule in ATL7 Pin
tom groezer16-Nov-06 1:22
tom groezer16-Nov-06 1:22 
AnswerRe: replacment of CComModule in ATL7 Pin
prasad_som16-Nov-06 1:44
prasad_som16-Nov-06 1:44 
GeneralRe: replacment of CComModule in ATL7 Pin
tom groezer22-Nov-06 4:03
tom groezer22-Nov-06 4:03 
Questionshow or hiding tool bar Pin
salman kazi15-Nov-06 18:07
salman kazi15-Nov-06 18:07 
QuestionFont Information Pin
Gupta Suraj14-Nov-06 8:10
Gupta Suraj14-Nov-06 8:10 
QuestionSpecialization Pin
Juan Antonio Bermejo14-Nov-06 6:15
Juan Antonio Bermejo14-Nov-06 6:15 
AnswerRe: Specialization Pin
Joaquín M López Muñoz18-Nov-06 4:26
Joaquín M López Muñoz18-Nov-06 4:26 
Hello Juan,

The overload you're proposing (it's an overload, not a specialization) is illegal because std::vector<T>::iterator is not what the standard calls a proper deduced context. An example will help clarify why the language cannot accept contexts of the form a<T>::b where T is a template parameter. Consider the following:
template<typename T>
struct foo
{
  typedef void * type;
  type a;
};
 
template<typename T>
void f(typename foo<T>::type a){...}
 
int main()
{
  foo<int> x;
  f(x.a); // problematic call
}
Do you see why this cannot work? Although it seems like the call f(x.a) should deduce T to be int, in reality it is impossible to make this deduction, as foo<T>::type is void * for every T.

In your particular case, you might want to replace this overload (which can't work for the reasons explained) with some machinery to dispatch SomeFunction based on the category of the iterator (bidirectional, random-access, etc.) If you need help with this feel free to ask.

Hope this helps,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!

GeneralRe: Specialization Pin
Juan Antonio Bermejo19-Nov-06 20:44
Juan Antonio Bermejo19-Nov-06 20:44 
AnswerRe: Specialization Pin
Zac Howland20-Nov-06 5:45
Zac Howland20-Nov-06 5:45 
QuestionSubstitute of CComModule _Module in VC2005 Pin
tom groezer13-Nov-06 18:59
tom groezer13-Nov-06 18:59 
Questionis socket class is blocking Pin
vineeshV13-Nov-06 6:06
vineeshV13-Nov-06 6:06 
AnswerRe: is socket class is blocking Pin
led mike13-Nov-06 11:38
led mike13-Nov-06 11:38 
JokeRe: is socket class is blocking Pin
Chris Meech17-Nov-06 8:14
Chris Meech17-Nov-06 8:14 
JokeRe: is socket class is blocking Pin
Jörgen Sigvardsson17-Nov-06 8:34
Jörgen Sigvardsson17-Nov-06 8:34 
Questionhow to handle pss_thru in hyerthreading Pin
vineeshV13-Nov-06 6:02
vineeshV13-Nov-06 6:02 
AnswerRe: CComModule _Module; Pin
led mike13-Nov-06 11:37
led mike13-Nov-06 11:37 
Questionproblem with registering a dll Pin
narayanagvs13-Nov-06 0:37
narayanagvs13-Nov-06 0:37 
AnswerRe: problem with registering a dll Pin
User 21559714-Nov-06 23:55
User 21559714-Nov-06 23:55 
QuestionHow to use tab control in split window by WTL Pin
Tom zh11-Nov-06 15:40
Tom zh11-Nov-06 15:40 
QuestionDebugging and ATL Pin
Polity4h11-Nov-06 5:00
Polity4h11-Nov-06 5:00 
AnswerRe: Debugging and ATL Pin
User 21559714-Nov-06 23:43
User 21559714-Nov-06 23:43 
GeneralRe: Debugging and ATL Pin
Polity4h15-Nov-06 2:24
Polity4h15-Nov-06 2:24 
Questionwhy 3rd parameter change to char? Pin
alan top10-Nov-06 13:56
alan top10-Nov-06 13:56 
AnswerRe: why 3rd parameter change to char? Pin
Stuart Dootson10-Nov-06 23:48
professionalStuart Dootson10-Nov-06 23:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.