In my experience, any fish that will let you get that close to it isn't going to bite anything you throw at it. The only exception I can really think of is sunfish in the shallows. They seem to have a higher spook tolerance, or maybe their eyesight just stinks.
But of course I cast to anything that gets that close anyway because there are exceptions, such as last summer when I was wading a local reservoir. I had stopped to change flies, and was all thumbs and it was taking me forever to tie the new fly on. After about 5 minutes of standing absolutely still, I see a pair of 4-5 lb largemouth bass swim by 25 feet away from me.
As for the "feet of line" question, I don't usually hear a question or statement phrased that way. For instance, people don't say "You need to be able to cast 40 feet of line
to catch bonefish." They simply say "You need to be able to cast 40 feet
." But if somebody were to ask me, I'd probably err towards including some of my leader in the measurement. But I always use 12 ft leaders, which is a lot longer than most people, so if I'm casting 40 feet of fly line then I'm actually casting 52 feet, a significant difference!