Re: [mimetic-users] Instance of . should be -> in tokenizer.h
Brought to you by:
tat0o
|
From: Stefano B. <st...@co...> - 2012-07-25 17:24:35
|
Hello Amy,
sorry if it took a while to reply :) thanks for the fix.
stefano
On Wed, Jul 11, 2012 at 6:24 PM, Amy Troschinetz
<Amy...@ad...> wrote:
> I found this bug after switching over to clang++ from g++:
>
> --- tokenizer.h 2012-07-10 18:01:17.000000000 -0500
> +++ tokenizer.h 2012-07-10 18:01:45.000000000 -0500
> @@ -149,7 +149,7 @@
> // so "cont" MUST be in scope for all following calls
> // to next(...).
> ContTokenizer(const Container* cont)
> - : ItTokenizer<const_iterator, value_type>(cont.begin(), cont.end())
> + : ItTokenizer<const_iterator, value_type>(cont->begin(), cont->end())
> {
> }
> template<typename DelimCont>
>
> In this context, cont is a pointer, so it follows that we should use operator->() here. With g++, in our code base, this template was never instantiated so g++ ignored the bug. With clang++ this error is found regardless of instantiation.
>
> —
> Amy Troschinetz
> Senior Software Developer
>
> Adometry, Inc.
> (512) 852-7127 (office)
> Amy...@ad...
> www.adometry.com
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Mimetic-users mailing list
> Mim...@li...
> https://lists.sourceforge.net/lists/listinfo/mimetic-users
|