Skip to content

Commit

Permalink
Fixing some linker warnings
Browse files Browse the repository at this point in the history
Have to keep the instantiation of internally used templates internal to the library proper by making use of the "extern" trick.
  • Loading branch information
codemercenary authored and gtremper committed Jan 29, 2015
1 parent dae89ed commit 3852059
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autowiring/AutoPacketFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,5 @@ extern template struct SlotInformationStump<AutoPacketFactory, false>;
extern template const std::shared_ptr<AutoPacketFactory>& SharedPointerSlot::as<AutoPacketFactory>(void) const;
extern template std::shared_ptr<AutoPacketFactory> autowiring::fast_pointer_cast<AutoPacketFactory, Object>(const std::shared_ptr<Object>& Other);
extern template class RegType<AutoPacketFactory>;
extern template struct autowiring::fast_pointer_cast_blind<Object, AutoPacketFactory>;
extern template struct autowiring::fast_pointer_cast_initializer<Object, AutoPacketFactory>;
3 changes: 3 additions & 0 deletions autowiring/fast_pointer_cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#include MEMORY_HEADER
#include TYPE_TRAITS_HEADER

class AutoPacketFactory;
class Object;

namespace autowiring {
template<class T, class U>
struct fast_pointer_cast_blind;
Expand Down
2 changes: 2 additions & 0 deletions src/autowiring/AutoPacketFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,5 @@ template struct SlotInformationStump<AutoPacketFactory, false>;
template const std::shared_ptr<AutoPacketFactory>& SharedPointerSlot::as<AutoPacketFactory>(void) const;
template std::shared_ptr<AutoPacketFactory> autowiring::fast_pointer_cast<AutoPacketFactory, Object>(const std::shared_ptr<Object>& Other);
template class RegType<AutoPacketFactory>;
template struct autowiring::fast_pointer_cast_blind<Object, AutoPacketFactory>;
template struct autowiring::fast_pointer_cast_initializer<Object, AutoPacketFactory>;

0 comments on commit 3852059

Please sign in to comment.