#include <limits>
#include <iostream>
template <typename T>
extern auto foo = std::numeric_limits<T>::max();
int main() {
std::cout << foo<float> << std::endl; // prints 3.40282e+38
foo<float> = 42.0;
std::cout << foo<float> << std::endl; // prints 42
return 0;
}
I2luY2x1ZGUgPGxpbWl0cz4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGUgPHR5cGVuYW1lIFQ+CmV4dGVybiBhdXRvIGZvbyA9IHN0ZDo6bnVtZXJpY19saW1pdHM8VD46Om1heCgpOwoKaW50IG1haW4oKSB7CglzdGQ6OmNvdXQgPDwgZm9vPGZsb2F0PiA8PCBzdGQ6OmVuZGw7ICAvLyBwcmludHMgMy40MDI4MmUrMzgKCWZvbzxmbG9hdD4gPSA0Mi4wOwoJc3RkOjpjb3V0IDw8IGZvbzxmbG9hdD4gPDwgc3RkOjplbmRsOyAgLy8gcHJpbnRzIDQyCglyZXR1cm4gMDsKfQ==