STL Array

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

STL Array

Postby jayden » Wed Oct 07, 2015 6:09 am

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
jayden
Active Poster
Active Poster
 
Posts: 24
Joined: Fri Aug 21, 2015 3:41 pm

Re: STL Array

Postby rlebeau » Wed Oct 07, 2015 5:55 pm

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.
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1498
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA


Return to Technical

Who is online

Users browsing this forum: Google [Bot] and 18 guests