Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Any compiler without C++11 lambdas?

92 views
Skip to first unread message

Lorenzo Caminiti

unread,
Nov 25, 2011, 3:29:07 PM11/25/11
to
Hello all,

Do you know any "modern" C++ compilers that does /not/ support C++11
lambda functions?

Do not support:
* Clang
Others?

Support:
* MSVC
* GCC
Others?

Thanks a lot.
--Lorenzo


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Andy Champ

unread,
Nov 25, 2011, 9:51:35 PM11/25/11
to
On 25/11/2011 20:29, Lorenzo Caminiti wrote:
> Support:
> * MSVC

MSVC's lambdas have a fair few bugs in them. for example

http://connect.microsoft.com/VisualStudio/feedback/details/537366/c-nested-lambda-functions-lose-scope

"Closed as Fixed"

....

"Hi: a fix for this issue has been checked into the compiler sources.
The fix should show up in a future release of Visual C++."

Andy

Mathias Gaunard

unread,
Nov 27, 2011, 5:19:48 PM11/27/11
to
On Nov 25, 9:29 pm, Lorenzo Caminiti <lorcamin...@gmail.com> wrote:
> Hello all,
>
> Do you know any "modern" C++ compilers that does /not/ support C++11
> lambda functions?
> [...]
> * GCC

GCC only supports it since 4.5, and only in C++0x mode, which is not
the default.
A lot of people still use older versions of GCC.

Likewise, a lot of people still use older versions of MSVC.

Arne Mertz

unread,
Nov 28, 2011, 5:29:33 PM11/28/11
to
On Nov 27, 11:19 pm, Mathias Gaunard <loufo...@gmail.com> wrote:
>
> GCC only supports it since 4.5, and only in C++0x mode, which is not
> the default.
> A lot of people still use older versions of GCC.
>
> Likewise, a lot of people still use older versions of MSVC.

I think it's pretty obvious that there are older versions of almost
any compiler, and that those older versions do not support C++11
features. Therefore the OP was asking about "modern" compilers.

On Nov 26, 3:51 am, Andy Champ <no....@nospam.invalid> wrote:
>
> MSVC's lambdas have a fair few bugs in them. for example
>
> http://connect.microsoft.com/VisualStudio/feedback/details/537366/c-n...
>
> "Closed as Fixed"
>
> ....
>
> "Hi: a fix for this issue has been checked into the compiler sources.
> The fix should show up in a future release of Visual C++."
>

It seems they messed up the whole name lookup in or near lambdas. In
addition to the bug you mention, I found something very astonishing
one day:

http://connect.microsoft.com/VisualStudio/feedback/details/689504/c2326-on-lambdas-with-this-capture

@topic:
another compiler that supports some C++11 Features (such as variadic
templates, auto type specifier, decltype and more) but does not
support lambdas is IBM's XL C/C++ 11.1 for AIX (I am not shure about
current versions for XL C++ for other platforms)

Regards
Arne

Mogens Hansen

unread,
Dec 9, 2011, 12:55:39 AM12/9/11
to
"Lorenzo Caminiti" <lorca...@gmail.com> wrote in message
news:aeb787cf-1307-452f...@h3g2000yqa.googlegroups.com...
> Hello all,
>
> Do you know any "modern" C++ compilers that does /not/ support C++11
> lambda functions?

Embarcadero C++Builder XE2.
It does support other C++11 features like enum class and move semantics.

--
Kind regards

Mogens Hansen

Mathias Gaunard

unread,
Dec 9, 2011, 12:25:58 PM12/9/11
to
On Nov 28, 11:29 pm, Arne Mertz <arneme...@googlemail.com> wrote:

> I think it's pretty obvious that there are older versions of almost
> any compiler, and that those older versions do not support C++11
> features. Therefore the OP was asking about "modern" compilers.

GCC 4.4 is still very modern. Latest XCode ships with GCC 4.2, which
is even older.

Also, some hardware does not support more recent versions of GCC
yet...
That's the case of CUDA for example.

Kevin P. Fleming

unread,
Dec 10, 2011, 8:55:39 AM12/10/11
to
On 12/09/2011 11:25 AM, Mathias Gaunard wrote:
> On Nov 28, 11:29 pm, Arne Mertz<arneme...@googlemail.com> wrote:
>
>> I think it's pretty obvious that there are older versions of almost
>> any compiler, and that those older versions do not support C++11
>> features. Therefore the OP was asking about "modern" compilers.
>
> GCC 4.4 is still very modern. Latest XCode ships with GCC 4.2, which
> is even older.

The latest Xcode only includes GCC as a backwards-compatibility measure; Apple has switch to Clang+LLVM as their compiler of choice.

Mathias Gaunard

unread,
Dec 11, 2011, 3:52:10 AM12/11/11
to
On Dec 10, 2:55 pm, "Kevin P. Fleming" <n...@kpfleming.us> wrote:

> The latest Xcode only includes GCC as a backwards-compatibility measure; Apple has switch to Clang+LLVM as their compiler of choice.

llvm-gcc has enough problems has it is; clang is even worse. What they
shipped is a *svn version*. It's not stable at all.
0 new messages