I know. But I think Java had them before C++, and I think that Java was the first mainstream, C++-syntax, object-oriented language to have them. (Yeah, I know, that's not saying much, because C++ and Java are the only two mainstream, C++-syntax, object-oriented languages.) The point was, C++ could have looked at Java as proof that a language like C++ could have closures, and so one could suspect that the immediate, direct inspiration was from Java.
I only mentioned closures because it's the only feature I could think of that C++ has, but Java had first. (I welcome other examples, if anyone has them.)
C# was the first mainstream language with a C-style syntax to have them - anonymous delegates in C# 2 (2005), then lambdas with type inference in C# 4 (2010).
Java got them in Java 7 in 2011, more or less at the same time as C++11 did.
In any case, Java and C# closures weren't particularly helpful to C++, because they have only shown that a garbage-collected language can have them - the main complexity around closures is wrt memory management and ownership. Hence why C++ closures are very different from either Java or C#.
I suspect that C++ got the now-deprecated exception specifiers - throw() on functions - from Java. But not entirely sure.
I checked my copy of the C++ Programming Language (2nd edition, 1991) which has throw() exception specifiers on functions. The Java project started in 1991.
I'm not sure these qualify as closures. But if they do, then they've been around in that exact form (named local functions with language semantics preventing them from outliving their environment) since Algol-60.
> I have no idea what the c++ committee were using as predicates
And in fairness, neither do I. My point wasn't "C++ copied closures from Java". My point was "I can't think of anything else they copied from Java", and therefore that I suspected that the answer to jedberg's question was no.
I only mentioned closures because it's the only feature I could think of that C++ has, but Java had first. (I welcome other examples, if anyone has them.)