Page 1 of 1

STL Array

PostPosted: Wed Oct 07, 2015 6:09 am
by jayden
Hi,

Having a bit of a odd problem in Seattle whereby the compiler will throw an error that array has not been found in std when compiling on:
[*]OS X
[*]Win 32

However on
[*]iOS 64/32
[*]Android
[*]Win 64
It doesn't! I am #include <array> but this doesn't seem to make a difference. On these devices however std::map & std::vector are visible.

Any help would be great!

Thanks,
Jayden

Re: STL Array

PostPosted: Wed Oct 07, 2015 5:55 pm
by rlebeau
jayden wrote:Having a bit of a odd problem in Seattle whereby the compiler will throw an error that array has not been found in std when compiling on:
[*]OS X
[*]Win 32


std::array was introduced in C++11. The Win32 *clang-based* compiler (new in Seattle) supports C++11, but the Win32 *classic* (Borland) compiler does not. In Seattle, there is a project option to specify which Win32 compiler you want to use. The OSX compiler does not support C++11 yet, as it is an off-shoot of the Win32 *classic* compiler and has not been updated to clang yet.

jayden wrote:However on
[*]iOS 64/32
[*]Android
[*]Win 64
It doesn't!


All of those are clang-based compilers that support C++11. See Embarcadero's Docwiki for more details:

Clang-enhanced C++ Compilers

jayden wrote:On these devices however std::map & std::vector are visible.


Those classes have been around for a LONG LONG time - since C++98 when containers were first added to the STL.