You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "David Bertoni (JIRA)" <xa...@xml.apache.org> on 2010/05/15 22:05:44 UTC

[jira] Resolved: (XALANC-699) Compile using Visual C++ 2010 (VC10)

     [ https://issues.apache.org/jira/browse/XALANC-699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Bertoni resolved XALANC-699.
----------------------------------

    Resolution: Fixed

Fix committed. Can you please verify? Thanks!

> Compile using Visual C++ 2010 (VC10)
> ------------------------------------
>
>                 Key: XALANC-699
>                 URL: https://issues.apache.org/jira/browse/XALANC-699
>             Project: XalanC
>          Issue Type: New Feature
>          Components: XalanC
>    Affects Versions: CurrentCVS
>         Environment: Visual C++ 2010 (VC10) on Windows 7
>            Reporter: Ivan Pechorin
>            Assignee: David Bertoni
>             Fix For: CurrentCVS
>
>
> VC10 gives the following compile error for the current trunk of Xalan-C:
> 2>  StylesheetExecutionContextDefault.cpp
> 2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(163): error C2440: 'initializing' : cannot convert from 'int' to 'xercesc_3_0::MemoryManager *'
> 2>          Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
> 2>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(247) : see reference to function template instantiation 'std::_Pair_base<_Ty1,_Ty2>::_Pair_base<_Ty,_Ty>(_Other1 &&,_Other2 &&)' being compiled
> 2>          with
> 2>          [
> 2>              _Ty1=xercesc_3_0::MemoryManager *,
> 2>              _Ty2=xalanc_1_11::XalanSourceTreeDocument *,
> 2>              _Ty=int,
> 2>              _Other1=int,
> 2>              _Other2=int
> 2>          ]
> 2>          D:\dev\vc10\PIE\xml-xalan\src\xalanc/Include/XalanMemMgrAutoPtr.hpp(58) : see reference to function template instantiation 'std::pair<_Ty1,_Ty2>::pair<int,int>(_Other1 &&,_Other2 &&)' being compiled
> 2>          with
> 2>          [
> 2>              _Ty1=xercesc_3_0::MemoryManager *,
> 2>              _Ty2=xalanc_1_11::XalanSourceTreeDocument *,
> 2>              _Other1=int,
> 2>              _Other2=int
> 2>          ]
> 2>          D:\dev\vc10\PIE\xml-xalan\src\xalanc/Include/XalanMemMgrAutoPtr.hpp(56) : while compiling class template member function 'xalanc_1_11::XalanMemMgrAutoPtr<Type>::MemMgrAutoPtrData::MemMgrAutoPtrData(void)'
> 2>          with
> 2>          [
> 2>              Type=xalanc_1_11::XalanSourceTreeDocument
> 2>          ]
> 2>          D:\dev\vc10\PIE\xml-xalan\src\xalanc/Include/XalanMemMgrAutoPtr.hpp(210) : see reference to class template instantiation 'xalanc_1_11::XalanMemMgrAutoPtr<Type>::MemMgrAutoPtrData' being compiled
> 2>          with
> 2>          [
> 2>              Type=xalanc_1_11::XalanSourceTreeDocument
> 2>          ]
> 2>          d:\dev\vc10\pie\xml-xalan\src\xalanc\xslt\StylesheetExecutionContextDefault.hpp(1115) : see reference to class template instantiation 'xalanc_1_11::XalanMemMgrAutoPtr<Type>' being compiled
> 2>          with
> 2>          [
> 2>              Type=xalanc_1_11::XalanSourceTreeDocument
> 2>          ]
> 2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(163): error C2439: 'std::_Pair_base<_Ty1,_Ty2>::first' : member could not be initialized
> 2>          with
> 2>          [
> 2>              _Ty1=xercesc_3_0::MemoryManager *,
> 2>              _Ty2=xalanc_1_11::XalanSourceTreeDocument *
> 2>          ]
> 2>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(166) : see declaration of 'std::_Pair_base<_Ty1,_Ty2>::first'
> 2>          with
> 2>          [
> 2>              _Ty1=xercesc_3_0::MemoryManager *,
> 2>              _Ty2=xalanc_1_11::XalanSourceTreeDocument *
> 2>          ]
> 2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(163): error C2440: 'initializing' : cannot convert from 'int' to 'xalanc_1_11::XalanSourceTreeDocument *'
> 2>          Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
> 2>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(163): error C2439: 'std::_Pair_base<_Ty1,_Ty2>::second' : member could not be initialized
> 2>          with
> 2>          [
> 2>              _Ty1=xercesc_3_0::MemoryManager *,
> 2>              _Ty2=xalanc_1_11::XalanSourceTreeDocument *
> 2>          ]
> 2>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(167) : see declaration of 'std::_Pair_base<_Ty1,_Ty2>::second'
> 2>          with
> 2>          [
> 2>              _Ty1=xercesc_3_0::MemoryManager *,
> 2>              _Ty2=xalanc_1_11::XalanSourceTreeDocument *
> 2>          ]
> The following patch is fixed the build.
> ===================================================================
> --- src/xalanc/Include/XalanMemMgrAutoPtr.hpp	(revision 940963)
> +++ src/xalanc/Include/XalanMemMgrAutoPtr.hpp	(working copy)
> @@ -54,7 +54,11 @@
>      public:
>  
>          MemMgrAutoPtrData():
> +#ifdef _NATIVE_NULLPTR_SUPPORTED
> +            AutoPtrPairType(nullptr,nullptr)
> +#else
>              AutoPtrPairType(0,0)
> +#endif
>          {
>          }
>  
> nullptr is a C++0x feature, "_NATIVE_NULLPTR_SUPPORTED" is defined in "C:\Program Files\Microsoft Visual Studio 10.0\VC\include\stddef.h" and it is the symbol being checked for in other VC10 headers.
> I'm not aware of any clean or portable way to detect presence of the nullptr.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org