Only in reference to Ranged Attacks, otherwise not.
PHB, Pg 280
"When you make a ranged attack against an enemy, and other enemies are in the way, your target has cover"
The and is important, it indicates that both clauses must be true for the result to be true. If you aren't making a ranged...