Your definition doesn't strike me as correct. An idiom is a way of writng something that may or may not be possible in other languages, but that is commonplace in this language. Usually, it's shorter than the alternative, but that's not really a requirement.
It might be easier to explain it by talking about what is non-idiomatic. In C++, it's pretty idiomatic to write:
Foo* p = SomeThingThatReturnsAFooPointer(arg, param, x, y);
if(p)
{
// whatever
}
It's even more idiomatic to write:
Foo* p;
if(p = SomeThingThatReturnsAFooPointer(arg, param, x, y))
{
// whatever
}
This code does exactly the same thing - some folks who are new to C++ might read it as testing to see if p is equal to what the function returns, but that's not what it does.
Compare to what someone might write, very non-idiomatically, who has come from another language:
Foo* p = SomeThingThatReturnsAFooPointer(arg, param, x, y);
if(p !=NULL)
{
// whatever
}
You'll also see this stuff knocked as non-idiomatic:
if (x>0)
return true;
else
return false;
Because the idiomatic approach is
return (x>0);
The non-idiomatic ways aren't wrong, but they usually take longer to type and they always take longer to read, for those who know the idioms. If I call you "the boy who cried wolf" and you know the story, it's quicker than if I explain about how false alarms cause people to ignore you. The problem, of course, is if you don't know the story and don't know what wolves have to do with what we're talking about. Similarly, it can be a problem if you've never seen return x<y;
before and really don't know what it does.