Tim Cook, the chief executive of Apple, is spreading misinformation about a new religious-freedom law in Indiana.

That law and similar ones, he writes in the Washington Post, "say individuals can cite their personal religious beliefs to refuse service to a customer or resist a state nondiscrimination law." He goes on to claim that they "rationalize injustice by pretending to defend something many of us hold dear. They go against the very principles our nation was founded on, and they have the potential to undo decades of progress toward greater equality."

Discrimination against gay customers or employees is what opponents of the law are especially concerned about. But that's a strange argument to make in the context of Indiana, which lacks any state nondiscrimination law on sexual orientation for people to resist. Discrimination on the basis of sexual orientation is legal almost everywhere in the state, and was before this religious-freedom law passed.

Cook may not be aware of this point or others that cut against his argument because reporting on this controversy has been abysmal. Cook may also be unaware that the "wave of legislation" that he fears has largely already happened. A very similar religious-freedom law has been on the federal books for 22 years, and that law itself codified a Supreme Court doctrine that had been in place for most of the previous few decades. Nineteen states besides Indiana have similar laws. The laws don't seem to be abetting a rising tide of discrimination based on sexual orientation, or based on anything else.

What these religious-freedom laws say is that government can require people to violate their religious beliefs only when it is pursuing a compelling interest, and must do so in the least intrusive manner possible. Thus the Supreme Court recently ruled under a federal religious-freedom law that a Muslim prisoner doesn't have to shave his beard. These sorts of accommodations have long had a place in American law, and have typically been advanced to protect Muslims, Hindus, adherents of traditional Native American religions and other minorities.

The Indiana law arguably differs from other such laws in two ways. It explicitly protects corporate "persons" in their exercise of religious freedom and it applies to legal cases in which the government is not a party. Other religious-freedom laws haven't spelled out these points but have sometimes been read to include them. Under the Indiana law, then, an individual filing a discrimination case against a company could run up against a company's claim that it had a religious duty to discriminate.

In theory, the application of the religious-freedom defense to litigation by private parties makes sense: The point of the religious-freedom protection is to keep government policy from imposing unnecessary burdens on religious practice, and so it shouldn't matter if it's an individual who is trying to get the policy applied.

But it's important to remember that these religious-freedom laws only create a legal claim for people who object to the application of a law. They don't guarantee that those claims will prevail — and, in practice, such claims haven't fared well in court.

Douglas Laycock, a law professor at the University of Virginia and one of the country's foremost experts on religious freedom, says that he hopes these laws "affect discrimination claims in certain very narrow contexts: very small businesses providing wedding services or marital counseling services. But I am not optimistic."

So far, he says, religious claimants — including a wedding photographer in New Mexico and a florist in Washington — "have lost all of those cases."

I don't believe people who make wedding cakes should be forced by law to cater same-sex weddings if they object. People of good will can differ on that point. What we are discussing, though, is a law that theoretically lets those objectors have a day in court (in one of the few Indiana jurisdictions where the law regulates this choice in the first place). And that's just not the same as bringing back whites-only water fountains, to take one of Cook's outlandish examples.

Cook argues that religious-freedom laws "truly will hurt jobs, growth and the economic vibrancy" of places that adopt them. Because he ignores the previous laws, he offers no evidence to substantiate these claims. What might hurt the economies of these states, though, are boycotts driven by false impressions of the sort Cook is creating.

"Opposing discrimination takes courage," Cook writes. So it can. What he's doing, though, takes no courage at all.

Ramesh Ponnuru, a Bloomberg View columnist, is a senior editor for National Review and a visiting fellow at the American Enterprise Institute.