This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Missing constructor call...


> If I have a class representing iterators, then under
> certain circumstances:

Is there anyway you can describe a bit more these certain circumstances
to determine whether this is really a bug in your code or in the gcc? It
is really suspicious that this is working in some instances and not in
others...

Thanks,
Gokhan


> 
>   const C::const_iterator start = my_list.begin();
>   C::const_iterator iter = start;
> 
> will result in no constructor being called for iter,
> Whereas:
> 
>   const C::const_iterator start = my_list.begin();
>   C::const_iterator iter;
>   iter = start;
> 
> results in the correct code. Also:
> 
>   const C::const_iterator start = my_list.begin();
>   C::const_iterator iter(start);
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]