This depends on which part of the bike you are degreasing.
For degreasing the chain, whatever works for you should be fine. In the worst case, you will learn that the particular type of degreaser does not work to break the muck of your chain. Every non-corroding substance may be tried: from plain water through dish soap detergent up to aceton, kerosene and petrol (the last one is dangerously flammable!).
As an example, I usually use bicycle-specific environmentally friendly degreasers. When I am out of them (like it is now), I use dish soap and heavy scrubbing. For a certain label of PFTE lube (I no longer use it), I have discovered that nothing would solve it except for soaking in acetone or lye. That lube worked great while it lasted, but washing it away was near impossible.
The classic WD-40 will also work as degreaser in many cases (not as lubricant however). Although, it is a quite expensive fluid for such a task. Lacking anything else at hand, I would not hesitate to apply it.
For any other surface on the bike, including brake rotors, frame paint etc., more care must be taken, unless you are prepared to replace a ruined part.
For brake rotors, use water if you do not have a brake-specific detergent. After washing brakes, the initial braking efficiency may decrease for a short period, then return back to normal. Be prepared for it.