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