In a closed economy, which is what you have because you are not considering net exports, I=S, so the definition of output is Y=C+I+G. This is because output equals total final-good expenditure on consumption, government final good expenditure (i.e. excluding transfers to consumers like benefits), and investment.
Note that S is not included in this definition because to do so would be to double-count investment (however I could substitute it in for I. Likewise, I have included G, or government expenditure, instead of T because this allows for a more flexible definition where the government doesn't necessarily run a balanced budget. However, not that if G=T then you could substitute T into the equation instead.
If you substitute S=I and then rearrange for S you will fine you get S=Y-C-G, which I presume is the definition you have come across previously.