I get the following basic error:
1> c: \ program files \ microsoft visual studio 10.0 \ vc \ include \ utility (163): error C2436: 'second': member function or nested class in the list of constructor initializers
Like many subobjects, I have no idea where to look or what is going wrong. (I know what these functions are, but I look at myself blindly, why this does not work)
Title Part:
typedef void *DuplicateFn(pTree&, const pTree&); enum DuplicateTy { SKIP, OVERWRITE, ASK }; typedef std::map<DuplicateTy, DuplicateFn> DuplicateMapTy; static const DuplicateMapTy DuplicateFns; static DuplicateMapTy DuplicateFns_INIT();
verbose namespace:
namespace detail { void OverWriteFn(GMProject::pTree& tOut, const GMProject::pTree& tIn); void AskFn(GMProject::pTree& tOut, const GMProject::pTree& tIn); }
Source part:
GMProject::DuplicateMapTy GMProject::DuplicateFns_INIT() { DuplicateMapTy tmp; auto p(std::make_pair(GMProject::OVERWRITE, &detail::OverWriteFn)); tmp.insert(p); //offending line return tmp; } const GMProject::DuplicateMapTy GMProject::DuplicateFns(GMProject::DuplicateFns_INIT());
Like I said, I look at myself blindly, why can't I insert this pair into the card? Am I just pasting a pointer to a function and an enumeration?
source share