Skip to content

Instantly share code, notes, and snippets.

@vedranmiletic
Created July 6, 2015 11:43
Show Gist options
  • Save vedranmiletic/d6647cd4dbb47a46f14e to your computer and use it in GitHub Desktop.
Save vedranmiletic/d6647cd4dbb47a46f14e to your computer and use it in GitHub Desktop.
Clang 3.6 callback.h warning fix
diff --git a/src/core/model/callback.h b/src/core/model/callback.h
--- a/src/core/model/callback.h
+++ b/src/core/model/callback.h
@@ -1252,10 +1252,12 @@
void DoAssign (Ptr<const CallbackImplBase> other) {
if (!DoCheckType (other))
{
+ const CallbackImplBase * otherRaw = PeekPointer (other);
Ptr<CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> > expected;
+ CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> * expectedRaw = PeekPointer (expected);
NS_FATAL_ERROR ("Incompatible types. (feed to \"c++filt -t\" if needed)" << std::endl <<
- "got=" << Demangle ( typeid (*other).name () ) << std::endl <<
- "expected=" << Demangle ( typeid (*expected).name () ));
+ "got=" << Demangle ( typeid (*otherRaw).name () ) << std::endl <<
+ "expected=" << Demangle ( typeid (*expectedRaw).name () ));
}
m_impl = const_cast<CallbackImplBase *> (PeekPointer (other));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment