Visual Studio 2005 및 Visual Studio 2008의 경고 수준 4와 함께 정상적으로 컴파일되는 응용 프로그램을 다시 컴파일하려고합니다. 오류 (아래 참조)가 std : tr1에서 발생하므로 충돌이 발생한다고 생각하지만 고칠 방법을 모르겠다. 내 첫 번째 생각은 부스트에 대한 모든 참조를 제거하는 것이었지만 그런 다음 형식 메서드를 찾을 수 없다는 오류가 발생합니다. 여기 오류 중 하나가 있습니다. (의미가 확실하지 않습니다) 아이디어, 제안 사항, 해결책이 있습니까? 감사합니다.Visual Studio 2010에서 왜 Boost 1.42.0에서이 오류가 발생합니까?
편집 : 나는 메시지가 표시 오른쪽 시작 부분에 : 알 수없는 컴파일러 버전 - 구성 테스트를 실행하고 결과를보고하시기 바랍니다
EDIT2 : 나는 원인이 오류를 생각하는 코드의 조각 : (무고한을 보호하기 위해 변경) EDIT3 : 오류 메시지를 업데이트했습니다. 즉, more ...를 추가했는데 더 많은 오류 메시지가 표시됩니다. 더 큰 문제/문제가 있습니다.
!m_someMap.insert(std::make_pair("somestring", SomeClass::isTrue)).second
....
.....
inline bool isTrue (const IDog & dog) { return s.IsDogTrue(); }
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\type_traits(197): error C2752: 'std::tr1::_Remove_reference<_Ty>' : more than one partial specialization matches the template argument list
1> with
1> [
1> _Ty=bool (__cdecl &)(const IDog &)
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtr1common(356): could be 'std::tr1::_Remove_reference<_Ty&&>'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtr1common(350): or 'std::tr1::_Remove_reference<_Ty&>'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\type_traits(962) : see reference to class template instantiation 'std::tr1::remove_reference<_Ty>' being compiled
1> with
1> [
1> _Ty=bool (__cdecl &)(const IDog &)
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\utility(26) : see reference to class template instantiation 'std::tr1::decay<_Ty>' being compiled
1> with
1> [
1> _Ty=bool (__cdecl &)(const IDog &)
1> ]
1> C:\(PATH)\...(915) : see reference to class template instantiation 'std::tr1::_Unrefwrap<_Type>' being compiled
1> with
1> [
1> _Type=bool (__cdecl &)(const IDog &)
1> ]
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\type_traits(965): error C2528: 'abstract declarator' : pointer to reference is illegal
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\type_traits(349): error C2528: 'type' : pointer to reference is illegal
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\type_traits(967) : see reference to class template instantiation 'std::tr1::add_pointer<_Ty>' being compiled
1> with
1> [
1> _Ty=bool (__cdecl &)(const IDog &)
1> ]
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\type_traits(197): error C2752: 'std::tr1::_Remove_reference<_Ty>' : more than one partial specialization matches the template argument list
1> with
1> [
1> _Ty=bool (__cdecl &)(const char *,int,const char *,std::string &)
1> ]
템플릿 인스턴스화에서 모든 오류가 발생합니다. Boost를 호출하기 위해이 코드를 진단해야합니다. –
비주얼 스튜디오 10에서 부스트를 빌드해야한다고 생각합니다. – ra170
@ ra170 : 아니요, 컴파일 중에 오류가 발생했습니다. 빌드가 부족하면 링크 시간 오류가 발생합니다. –