Cannot build Ogre using clang with -stdlib=libc++ option on OS X

Description

I'm trying to build Ogre with -stdlib=libc++ (our project uses Ogre and we want to adopt c+11. On OS X it require all dependencies to be build against libc+ instead of default libstdc++, which is pretty old one from gcc times).

There's only one fairly trivial (at least I hope it's trivial) problem in GL render system plugin, code like this one wouldn't compile:

I replaced instances of such code with

Now it compiles successfully. I think this change shouldn't harm other compilers/platforms, because we're getting invalid iterators in both ways, and they're initialised later.

Correct me if I'm wrong.

I will submit patch as bitbucket pull request.
I hope this patch would make it's way to 1.8.2.

Environment

OS X 10.8.2, Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)

Assignee

M

Reporter

Nikolay Kasyanov

Labels

Fix versions

Affects versions

Priority

Major
Configure