Actually, looks like I got something wrong with the generator expression. Does anything look off with my code above?
Problems were encountered while collecting compiler information:
gcc: error: $<0:-fopt-info-vec: No such file or directory
gcc: error: $<1:-fopt-info-vec: No such file or directory
cc1: error: unrecognized command line option '-fopt-info-loop>'
g++: error: $<1:-fopt-info-vec: No such file or directory
g++: error: $<0:-fopt-info-vec: No such file or directory
cc1plus: error: unrecognized command line option '-fopt-info-loop>'