You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Ivan Pechorin (JIRA)" <xa...@xml.apache.org> on 2010/05/04 19:30:55 UTC

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

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
             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


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

Posted by "Ivan Pechorin (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANC-699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865308#action_12865308 ] 

Ivan Pechorin commented on XALANC-699:
--------------------------------------

Well, I'm not proficient enough in C++, but as far as I understand, the problem here is quite different: given 0 == NULL, there is no obvious way to decide which template specialization should be preferred: int (0) or pointer (NULL). 

Actualy, I just needed to compile my project with all its dependencies (including Xalan-C) using VC10, because static code analysis of VC10: it helped us so much that other circumstances are less important.

> 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
>             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


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

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANC-699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866482#action_12866482 ] 

David Bertoni commented on XALANC-699:
--------------------------------------

There is no type deduction or template specialization involved here. The template is instantiated with as std::pair<MemoryManager*, Type*>, so pair::first is a pointer, and pair::second is a pointer. The constructor is:

	pair(const _Ty1& _Val1, const _Ty2& _Val2)
		: first(_Val1), second(_Val2)
		{	// construct from specified values
		}

You can also see the member function IsInitialized() compiles just fine with 0 as a null pointer constant:

        bool
        isInitialized()const
        {
            return this->first != 0 && this->second != 0;
        }

The code compiles without error on every other compiler Xalan-C supports, most of which are more standards-complaint than VS2010.

At any rate, the easiest fix is to simply call the default constructor for std::pair.

> 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
>             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


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

Posted by "Scott Colcord (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANC-699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865850#action_12865850 ] 

Scott Colcord commented on XALANC-699:
--------------------------------------

I'm reasonably proficient in C++, and I think Ivan's correct.  While 0 is a valid null pointer value, the type deduction rules here have no way to distinguish between 0 used as an int vs. 0 used as a null pointer, so it's assuming int.  That's the core reason that nullptr was added to C++0x.  Microsoft's STL implementor does a very thorough video discussion of the topic here:  http://channel9.msdn.com/shows/Going+Deep/Stephan-T-Lavavej-Everything-you-ever-wanted-to-know-about-nullptr

> 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
>             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


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

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANC-699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865269#action_12865269 ] 

David Bertoni commented on XALANC-699:
--------------------------------------

This is a Visual Studio bug. The addition of nullptr to the language does not mean 0 is no longer a valid null pointer constant. I can only imagine how much code this is going to break.

> 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
>             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


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

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XALANC-699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Bertoni reassigned XALANC-699:
------------------------------------

    Assignee: David Bertoni

> 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


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

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
     [ 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