EEPROM.get() variable by value

Hi everybody, I was just checking the EEPROM.get() reference on and noticed that in the example the second parameter, the one which will store the read value, is passed by value and not by reference:

float f = 0.00f;
int eeAddress = 0;

EEPROM.get( eeAddress, f );

How is it possible that at the end of the execution f will store the read value?

To my knowledge

It’s passed by reference. It is not passed as a pointer though.

You need to look at the function in the library to see it. From EEPROM.h

    //Functionality to 'get' and 'put' objects to and from EEPROM.
    template< typename T > T &get( int idx, T &t ){
        EEPtr e = idx;
        uint8_t *ptr = (uint8_t*) &t;
        for( int count = sizeof(T) ; count ; --count, ++e )  *ptr++ = *e;
        return t;

Note the & in fromt of the t parameter.

shure sorry for the trivial question, I'm a bit rusted in programming right now... ;D

Don't worry; I've only seen this construction since I'm hobbying with Arduinos ;)

So even my terminology is probably wrong.

The function declaration says that the value is passed by reference. There is nothing that you need to do when calling the function to make pass-by-reference happen.