• Mike Kaganski's avatar
    Unconst members of ControlTypeAndPart · 831de14f
    Mike Kaganski yazdı
    ... which need to be assignable in auto-generated operator= in VS2019
    toolset v142. Without that, a compile-time error is generated:
    
    [CXX] vcl/source/gdi/WidgetDefinitionReader.cxx
    [CXX] vcl/source/gdi/WidgetDefinition.cxx
    [CXX] vcl/source/gdi/gdimetafiletools.cxx
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): error C2220: warning treated as error - no 'object' file generated
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): warning C4239: nonstandard extension used: 'argument': conversion from 'const std::pair<const _Kty,_Ty>' to 'volatile const std::pair<_Kty,_Ty> &'
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): note: A non-const reference may only be bound to an lvalue; assignment operator takes a reference to non-const
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(486): note: see reference to function template instantiation 'void std::list<std::pair<const _Kty,_Ty>,std::allocator<std::pair<const _Kty,_Ty>>>::_Assign_cast<std::pair<_Kty,_Ty>&,std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const _Kty,_Ty>>>,std::_Iterator_base0>>(_UIter,const _UIter)' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _UIter=std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>>,std::_Iterator_base0>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(485): note: see reference to function template instantiation 'void std::list<std::pair<const _Kty,_Ty>,std::allocator<std::pair<const _Kty,_Ty>>>::_Assign_cast<std::pair<_Kty,_Ty>&,std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const _Kty,_Ty>>>,std::_Iterator_base0>>(_UIter,const _UIter)' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _UIter=std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>>,std::_Iterator_base0>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(481): note: while compiling class template member function 'void std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::_Copy_assign(const std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>> &,std::false_type)'
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _Hasher=std::hash<vcl::ControlTypeAndPart>,
    _Keyeq=std::equal_to<vcl::ControlTypeAndPart>,
    _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(516): note: see reference to function template instantiation 'void std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::_Copy_assign(const std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>> &,std::false_type)' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _Hasher=std::hash<vcl::ControlTypeAndPart>,
    _Keyeq=std::equal_to<vcl::ControlTypeAndPart>,
    _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\unordered_map(77): note: see reference to class template instantiation 'std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _Hasher=std::hash<vcl::ControlTypeAndPart>,
    _Keyeq=std::equal_to<vcl::ControlTypeAndPart>,
    _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>
    ]
    C:\cygwin\home\user\lode\dev\core\vcl\inc\widgetdraw/WidgetDefinition.hxx(260): note: see reference to class template instantiation 'std::unordered_map<vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>,std::hash<vcl::ControlTypeAndPart>,std::equal_to<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): error C2280: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': attempting to reference a deleted function
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\utility(177): note: see declaration of 'std::pair<_Kty,_Ty>::operator ='
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\utility(177): note: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': function was explicitly deleted
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): error C2220: warning treated as error - no 'object' file generated
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): warning C4239: nonstandard extension used: 'argument': conversion from 'const std::pair<const _Kty,_Ty>' to 'volatile const std::pair<_Kty,_Ty> &'
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): note: A non-const reference may only be bound to an lvalue; assignment operator takes a reference to non-const
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(486): note: see reference to function template instantiation 'void std::list<std::pair<const _Kty,_Ty>,std::allocator<std::pair<const _Kty,_Ty>>>::_Assign_cast<std::pair<_Kty,_Ty>&,std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const _Kty,_Ty>>>,std::_Iterator_base0>>(_UIter,const _UIter)' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _UIter=std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>>,std::_Iterator_base0>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(485): note: see reference to function template instantiation 'void std::list<std::pair<const _Kty,_Ty>,std::allocator<std::pair<const _Kty,_Ty>>>::_Assign_cast<std::pair<_Kty,_Ty>&,std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const _Kty,_Ty>>>,std::_Iterator_base0>>(_UIter,const _UIter)' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _UIter=std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>>,std::_Iterator_base0>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(481): note: while compiling class template member function 'void std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::_Copy_assign(const std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>> &,std::false_type)'
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _Hasher=std::hash<vcl::ControlTypeAndPart>,
    _Keyeq=std::equal_to<vcl::ControlTypeAndPart>,
    _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(516): note: see reference to function template instantiation 'void std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::_Copy_assign(const std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>> &,std::false_type)' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _Hasher=std::hash<vcl::ControlTypeAndPart>,
    _Keyeq=std::equal_to<vcl::ControlTypeAndPart>,
    _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\unordered_map(77): note: see reference to class template instantiation 'std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _Hasher=std::hash<vcl::ControlTypeAndPart>,
    _Keyeq=std::equal_to<vcl::ControlTypeAndPart>,
    _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>
    ]
    C:\cygwin\home\user\lode\dev\core\vcl\inc\widgetdraw/WidgetDefinition.hxx(260): note: see reference to class template instantiation 'std::unordered_map<vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>,std::hash<vcl::ControlTypeAndPart>,std::equal_to<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): error C2280: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': attempting to reference a deleted function
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\utility(177): note: see declaration of 'std::pair<_Kty,_Ty>::operator ='
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\utility(177): note: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': function was explicitly deleted
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): error C2220: warning treated as error - no 'object' file generated
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): warning C4239: nonstandard extension used: 'argument': conversion from 'const std::pair<const _Kty,_Ty>' to 'volatile const std::pair<_Kty,_Ty> &'
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): note: A non-const reference may only be bound to an lvalue; assignment operator takes a reference to non-const
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(486): note: see reference to function template instantiation 'void std::list<std::pair<const _Kty,_Ty>,std::allocator<std::pair<const _Kty,_Ty>>>::_Assign_cast<std::pair<_Kty,_Ty>&,std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const _Kty,_Ty>>>,std::_Iterator_base0>>(_UIter,const _UIter)' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _UIter=std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>>,std::_Iterator_base0>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(485): note: see reference to function template instantiation 'void std::list<std::pair<const _Kty,_Ty>,std::allocator<std::pair<const _Kty,_Ty>>>::_Assign_cast<std::pair<_Kty,_Ty>&,std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const _Kty,_Ty>>>,std::_Iterator_base0>>(_UIter,const _UIter)' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _UIter=std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>>,std::_Iterator_base0>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(481): note: while compiling class template member function 'void std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::_Copy_assign(const std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>> &,std::false_type)'
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _Hasher=std::hash<vcl::ControlTypeAndPart>,
    _Keyeq=std::equal_to<vcl::ControlTypeAndPart>,
    _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(516): note: see reference to function template instantiation 'void std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::_Copy_assign(const std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>> &,std::false_type)' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _Hasher=std::hash<vcl::ControlTypeAndPart>,
    _Keyeq=std::equal_to<vcl::ControlTypeAndPart>,
    _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\unordered_map(77): note: see reference to class template instantiation 'std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>,
    _Hasher=std::hash<vcl::ControlTypeAndPart>,
    _Keyeq=std::equal_to<vcl::ControlTypeAndPart>,
    _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>
    ]
    C:\cygwin\home\user\lode\dev\core\vcl\inc\widgetdraw/WidgetDefinition.hxx(260): note: see reference to class template instantiation 'std::unordered_map<vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>,std::hash<vcl::ControlTypeAndPart>,std::equal_to<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' being compiled
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): error C2280: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': attempting to reference a deleted function
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\utility(177): note: see declaration of 'std::pair<_Kty,_Ty>::operator ='
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\utility(177): note: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': function was explicitly deleted
    with
    [
    _Kty=vcl::ControlTypeAndPart,
    _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>
    ]
    make[1]: *** [C:/cygwin/home/user/lode/dev/core/solenv/gbuild/LinkTarget.mk:293: C:/cygwin/home/user/lode/dev/core/workdir/CxxObject/vcl/source/gdi/FileDefinitionWidgetDraw.o] Error 2
    make[1]: *** Waiting for unfinished jobs....
    make[1]: *** [C:/cygwin/home/user/lode/dev/core/solenv/gbuild/LinkTarget.mk:293: C:/cygwin/home/user/lode/dev/core/workdir/CxxObject/vcl/source/gdi/WidgetDefinition.o] Error 2
    make[1]: *** [C:/cygwin/home/user/lode/dev/core/solenv/gbuild/LinkTarget.mk:293: C:/cygwin/home/user/lode/dev/core/workdir/CxxObject/vcl/source/gdi/WidgetDefinitionReader.o] Error 2
    make: *** [Makefile:282: build] Error 2
    
    Change-Id: I9273bf7bfd78848918c783b8237e76b59e2043cf
    Reviewed-on: https://gerrit.libreoffice.org/73196
    Tested-by: Jenkins
    Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
    831de14f
Adı
Son kayıt (commit)
Son güncelleme
..
WidgetDefinition.hxx Loading commit data...
WidgetDefinitionReader.hxx Loading commit data...