QGIS expressions now support a layer_crs variable which will return the AuthID for a particular layer's coordinate reference system. This allows expressions to identify the layer CRS dynamically and perform transformations without needing to manually specify the CRS.
This feature was developed by Alex