[mimetic-users] Instance of . should be -> in tokenizer.h
Brought to you by:
tat0o
|
From: Amy T. <Amy...@ad...> - 2012-07-11 16:36:42
|
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
|