I was involved recently in a Facebook blowout, one of those “Someone Was Wrong on the Internet” moments where I had to take a deep breath and walk away in the realization that nothing I said, no evidence I brought out, would convince the interlocutor (who was mansplaining one of my areas of expertise to me) that he was not correct. What was the issue? Commenting on an article in Teen Vogue (leaders of the modern resistance) about  how sex with slaves was always rape, he threw out the “x is a modern idea” trope, i.e. consent doesn’t really apply in the past because we modern PC types invented it. That isn’t true. Ancient laws for both rape and adultery dating back as far as the Gortyn law code (6th century BCE) clearly factor consent--either of the women, if free, or the owner, if a slave--into what sort of crime has been committed [EDIT TO ADD: a colleague pointed out that Hammurabi's law code also contains this type of law]. If no consent was given by the woman (or even the slave in some instanced), the crime was hubris, i.e. rape. In fact, the idea of rape itself can only exist in a world where it is assumed that sex needs to be agreed upon by the parties involved.

So, let's start with the obvious: there is a difference between rape and not rape. In ancient Greece, rape typically fell under laws associated with hubris--the outrage against or abuse of another person intended to cause shame. I know, I know. Everyone thinks the word means arrogance, but that is its least common usage in Greek texts! Anyway, point being, the Greeks placed having sex with someone against their will under the category of hubris. They didn't have a single specific word for "rape", as far as I can tell. Athenian texts just use hubris. The Gortyn law code uses κάρτει (for κρατέω), which means to "force", "conquer", "control", or "seize"  or δαμάζω, "to subdue"  or "tame".  Either way, implicit in both words is the idea that rape is done without the person's consent. That there are laws against it, therefore, mean that the Greeks had a concept of consent. Otherwise, sex is just sex, regardless of whether the object of one's affections agrees to have it or not. And I say "object of affection" because men and women alike could be raped according to the law.

The Romans aren't much different. In fact, both the words for "rape" and "consent" are Latin! Rapio means to seize or take something/someone through violence. If someone has been "rapio-ed", they have been "ravished" or "raped". The Romans also used other words--in the story of Lucretia's rape by Sextus Tarquinius, he is said to "capture her by force" (per vim capit, 1.57.10). Capio has both neutral and violent connotations, but means essentially the same thing as rapio and κρατέω in its violent uses. And the story of Lucretia really gets at the heart of the issue of whether or not consent was "a modern idea" only. I'll quote some of the story (in English translation; you can read it in full here):

A few days afterwards Sextus Tarquinius went, unknown to Collatinus, with one companion to Collatia. He was hospitably received by the household, who suspected nothing, and after supper was conducted to the bedroom set apart for guests. When all around seemed safe and everybody fast asleep, he went in the frenzy of his passion with a naked sword to the sleeping Lucretia, and placing his left hand on her breast, said, ‘Silence, Lucretia! I am Sextus Tarquinius, and I have a sword in my hand; if you utter a word, you shall die.’
When the woman, terrified out of her sleep, saw that no help was near, and instant death threatening her, Tarquin began to confess his passion, pleaded, used threats as well as entreaties, and employed every argument likely to influence a female heart. When he saw that she was inflexible and not moved even by the fear of death, he threatened to disgrace her, declaring that he would lay the naked corpse of the slave by her dead body, so that it might be said that she had been slain in foul adultery. By this awful threat, his lust triumphed over her inflexible chastity, and Tarquin went off exulting in having successfully attacked her honour.
While some might say that she "consented", because she finally agreed after being threatened with death and with shame to let him rape her, Livy is very clear (as is the rest of Roman tradition) that she was forced against her will, that she did not consent, and, therefore, it was not adultery, but rape. Lucretia committed suicide (1.58)--her body was "violated" (violatum), but her soul was innocent (animus insons), and death was her proof of innocence (mors testis erit). She was innocent of a crime (adultery), but was too chaste to allow anyone to slander her as if she had. History has proven Lucretia's fears that she would not be believed otherwise, but with her death, she began a revolution. How so? Because sex by force was not just sex to the Romans. It was rape.

On one last note, we can muddy the waters here even more for those who say that consent is a modern idea only--adultery. In the laws of most Greek city-states in antiquity, the woman was not held responsible for adultery. One of the most well-known cases attesting to this is that of Euphiletus again the adulterer Eratosthenes, preserved in Euphiletus' speech written by Lysias. In Attic law, essentially, a woman was not considered mentally competent enough to consent to non-marital sex (whether she consented to marital sex is not at issue). Athenian law allowed Euphiletus to kill Eratosthenes on the spot if he caught him with his wife (or daughter or mother or household member). The wife, on the other hand, couldn't be harmed other than she would be divorced and sent back to her father (or brother). She was considered incapable of consenting to seduction legally, but the divorce implied that she did consent. 

If the perpetrator is committing adultery (seduction), then he can be killed on the spot. If he is raping her, he is committing hubris and is NOT legally able to be killed on the spot. The woman's CONSENT matters--even if she is not legally considered adult enough to be responsible for giving it under the strain of seduction. And, although a colleague of mine once said that he was sure women divorced for adultery were stigmatized, we have evidence that shows they still were remarried (the law just stipulated that they had to wait about 10 months before doing so).

The Gortyn law code is similar--the adultery law stipulates that if "someone" (always a man) is caught in adultery with women of various statuses, the man is punished. No punishment at all is given for the women in the laws. What this implies is that adultery is a crime of consent--the consent of whoever the male legal representative (kurios) is of the woman--father, husband, brother, owner (for slaves). So, adultery, like rape, involves consent. The difference is that the women must consent to avoid it being rape, the kurios must consent to avoid adultery. And, just on an aside--the Gortyn law code also stipulates that in cases of "he said, she said" involving slaves, the female slave is believed over whoever rapes her. This is, of course, intended to protect her owner's property (her), but it is still a pretty amazing stipulation.

What can we say about the notion that "consent is a modern idea"? Well, I think it is pretty clear that if there are laws differentiating rape from sex and laws concerning adultery, there is inherently a concept of consent. The problem for my FaceBook interlocutor, it seems, is a confusion over the notion of "affirmative consent" and simple consent. Affirmative consent--the idea that a woman must say or indicate "yes" explicitly at every stage of a sexual interaction--is modern, consent is not. To use one of my students' favorite (inaccurate) trite phrases, "since the beginning of time", laws have distinguished rape from not rape by asking the question "did they consent?". So, in answer to the question "Is consent a modern idea?", the answer is clearly "no".