Add 'reference' to the iterator_traits, needed by LegacyIterator reqs
commit97953a126ecbb364144a33937fc7cd75948c8024
authorMike Kaganski <mike.kaganski@collabora.com>
Thu, 6 Jan 2022 09:22:55 +0000 (6 12:22 +0300)
committerAron Budea <aron.budea@collabora.com>
Sat, 9 Dec 2023 10:43:13 +0000 (9 21:13 +1030)
tree1981cd9e672b61e2cfb492ec69153958ec1efb73
parent73e751fc67ea5ae52d15bea1645241ef624188a4
Add 'reference' to the iterator_traits, needed by LegacyIterator reqs

This addressed a failure with VS2022 Version 17.1.0 Preview 2.0:

    C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(1152): error C2794: 'reference': is not a member of any direct or in direct base class of 'std::iterator_traits<`anonymous-namespace'::lcl_DataSeriesContainerAppend>'
    C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3932): note: see reference to alias template instantiation 'std::_Iter_ref_t<`anonymous-namespace'::lcl_DataSeriesContainerAppend>' being compiled
    C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3992): note: see reference to variable template 'const bool _Iterator_is_volatile<`anonymous namespace'::lcl_DataSeriesContainerAppend>' being compiled
    C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(4048): note: see reference to function template instantiation '_OutIt std::_Copy_unchecked<com::sun::star::uno::Reference<com::sun::star::chart2::XDataSeriesContainer>*,_OutIt>(_InIt,_InIt,_OutIt)' being compiled
    with
    [
    _OutIt=`anonymous-namespace'::lcl_DataSeriesContainerAppend,
    _InIt=com::sun::star::uno::Reference<com::sun::star::chart2::XDataSeriesContainer> *
    ]
    C:/lo/src/core/chart2/source/controller/dialogs/DialogModel.cxx(504): note: see reference to function template instantiation '_OutIt std::copy<std::_Vector_iterator<std::_Vector_val<std::_Simple_types<_Ty>>>,`anonymous-namespace'::lcl_DataSeriesContainerAppend>(_InIt,_InIt,_OutIt)' being compiled
    with
    [
    _OutIt=`anonymous-namespace'::lcl_DataSeriesContainerAppend,
    _Ty=com::sun::star::uno::Reference<com::sun::star::chart2::XDataSeriesContainer>,
    _InIt=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<com::sun::star::uno::Reference<com::sun::star::chart2::XDataSeriesContainer>>>>
    ]
    C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3932): error C2938: 'std::_Iter_ref_t' : Failed to specialize alias template
    C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3932): error C2062: type 'unknown-type' unexpected
    C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3992): error C3376: 'std::_Iterator_is_volatile': only static data member templates are allowed
    C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(4026): error C2976: 'std::_Iter_copy_cat': too few template arguments
    C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3994): note: see declaration of 'std::_Iter_copy_cat'
    C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(1152): error C2794: 'reference': is not a member of any direct or in direct base class of 'std::iterator_traits<`anonymous-namespace'::lcl_RolesWithRangeAppend>'
    C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3932): note: see reference to alias template instantiation 'std::_Iter_ref_t<`anonymous-namespace'::lcl_RolesWithRangeAppend>' being compiled
    C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(3992): note: see reference to variable template 'const bool _Iterator_is_volatile<`anonymous namespace'::lcl_RolesWithRangeAppend>' being compiled
    C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1431~1.309\Include\xutility(4048): note: see reference to function template instantiation '_OutIt std::_Copy_unchecked<_InIt,_OutIt>(_InIt,_InIt,_OutIt)' being compiled
    with
    [
    _OutIt=`anonymous-namespace'::lcl_RolesWithRangeAppend,
    _InIt=const com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence> *
    ]
    C:/lo/src/core/chart2/source/controller/dialogs/DialogModel.cxx(563): note: see reference to function template instantiation '_OutIt std::copy<const E*,`anonymous-namespace'::lcl_RolesWithRangeAppend>(_InIt,_InIt,_OutIt)' being compiled
    with
    [
    _OutIt=`anonymous-namespace'::lcl_RolesWithRangeAppend,
    E=com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>,
    _InIt=const com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence> *
    ]
    make[1]: *** [C:/lo/src/core/solenv/gbuild/LinkTarget.mk:332: C:/lo/src/build/workdir/CxxObject/chart2/source/controller/dialogs/DialogModel.o] Error 2

Change-Id: Ic93dc7922cd48870ef62bfd682dd5cbdc827a255
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128036
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 0bc5584ef296683c015357232d48180b85f8baac)
chart2/source/controller/dialogs/DialogModel.cxx