How to compute the amount of memory an arduino program occupies in Flash Memory?

This is actually a 2 part question:

  1. I started learning about C++ STL containers and algorithms and I wonder if I have the entire C++ library and syntax at my disposable in creating an Arduino sketch.

  2. Now, correct me if I'm wrong (please & ty): C++ code gets translated into assembly/machine code which then gets uploaded into the ATmega's flash memory. If we wanted to know how much physical space a program occupies, we'd need to know the mapping between C++ instructions and their corresponding machine code instruction size. In theory, this should be computable but I'd imagine that it'd be a pain to calculate.

is there a way to quickly find how much space a library would take up once uploaded? (I can only think of actually creating a Cpp library or adding a prexisting one to an arduino sketch and and hitting the compile and upload button to find out).

is there a way to quickly find how much space a library would take up once uploaded? (

The IDE will tell you - no need to upload.

STL?
I don't know - never tried it, because I think a lot of it is inappropriate for the architecture.
I think Nick Gammon may have words of wisdom on STL.