On Thu, 23 Jan 2025 at 09:25, Nyall Dawson <nyall.daw...@gmail.com> wrote: > > Hi all, > > Please see https://github.com/qgis/QGIS-Enhancement-Proposals/pull/319 > for a proposed change to the QGIS coding policies to relax the current > prohibition against use of "auto" in some new cases. > > Specifically, allowing use of "auto" for variable types when the > variable type is explicitly stated during its initialization: > > auto may be used for variable types if the type is explicit during > variable initialization. Eg > > // allowed, as the QgsPoint type is explicit during initialization: > auto pointObject = QgsPoint( 3, 4 ); > // allowed, as the std::unique_ptr< QgsPoint >, std::shared_ptr< > QgsPoint > types are explicit during initialization: > auto pointUniquePointer = std::make_unique< QgsPoint >( 3, 4 ); > auto pointSharedPointer = std::make_shared< QgsPoint >( 3, 4 ); > > // NOT allowed, the argument types for the std::tuple are not explicit: > auto myTuple = std::make_tuple( 0, 5 ); > > Please keep discussion on > https://github.com/qgis/QGIS-Enhancement-Proposals/pull/319 so that we > have a formal record of the discussion.
This proposal has passed the 2 week discussion phase and is ready for voting now. Nyall _______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer