Please ignore the following part of my previous email:
On Wed, Jul 16, 2014 at 9:14 PM, Klaim - Joël Lamotte
Then I hit the same link error I reported previously, from optional code apparently:
3>typevaluemap.obj : error LNK2019: unresolved external symbol "class std::basic_ostream
& __cdecl boost::operator<< (class std::basic_ostream &,class boost::optional<int> const &)" (??$?6DU?$char_traits@D@std@@H@boost @@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV12@ABV?$optional@H @0@@Z) referenced in function "void __cdecl testing_internal::DefaultPrintNonContainerTo (class boost::optional<int> const &,class std::basic_ostream
*)" (??$DefaultPrintNonContainerTo@V?$optional@H @boost@@@testing_internal@@YAXABV?$optional@H@boost@@PAV?$basic_ostream@DU ?$char_traits@D@std@@@std@@@Z) I investigated further and found that this error only occur in when this function have been compiled:
template< class ValueType > inline boost::optional<ValueType> TypeValueMap::read() const { auto* slot = m_slot_index.find<ValueType>(); if( slot && slot->value ) { return slot->value.get(); } return {}; }
With slot's type looking like this:
template< class ValueType > struct SlotOf : public Slot { boost::optional<ValueType> value; //...
Maybe I did something wrong here? However, the link error report suggest that some boost optional's testing function is called when it shouldn't (this appear when I'm compiling my own project).
I found that it's a link issue related to GTest macros which apparently
generate this error when I try to test the optional result implicitely:
#include