We've all seen this play out so many times, right? The big national grocery chain turns up in a small town. Six months later half the high street stores are out of business, all the independent local gas stations are closed.
Oh geez, the price-gouging local gas stations and high street stores have gone out of business? Start a go fund me.
unless (a) the invention relates (i) directly to the business of the employer, or (ii) to the employer's actual or demonstrably anticipated research or development, or (b) the invention results from any work performed by the employee for the employer.
That is they key part. So yeah it isn't illegal as (i) (ii) apply.
C++ is the best example of second-system effect since OS/360.