Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7028249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:21:44+00:00 2026-05-28T00:21:44+00:00

The multiplatform engine we’re developing for our game uses the EASTL to replace the

  • 0

The multiplatform engine we’re developing for our game uses the EASTL to replace the STL, because of memory, performance and portability reasons. The EASTL can be found here:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html

Because Visual Studio is really good for debugging the STL we’re not using the EASTL on Windows while the engine is in development. Also some STL containers as std::queue, std::deque, … aren’t available in the EASTL. Because it doesn’t matter we’re using the eastl::string on Windows as well, because it’s fine for debugging.

What we’re doing until now is

#if (GIN_USE_EASTL)
    #define ginstl eastl
#else
    #define ginstl std
#endif

and GIN_USE_EASTL is defined as 0 on windows. The engine is called Ginkgo, thats where the GIN comes from.
We’re using lists, vectors, … like this

ginstl::list myList;
ginstl::vector myVector;

which works quite fine. But when we use a string or a queue, because of reasons I explained above, we have to write

eastl::string myString;
std::queue myQueue;

which is the reason why i’m posting here, because this is not optimal! What I want to do is use the ginstl:: macro for everything in the engine, without thinking about what implementation to use. So my approach on the problem was this:

#if (GIN_USE_EASTL)
    #define ginstl::list eastl::list
    #define ginstl::vector eastl::vector
    #define ginstl::string eastl::string
    #define ginstl::queue std::queue
#else
    #define ginstl::list std::list
    #define ginstl::vector std::vector
    #define ginstl::string eastl::string
    #define ginstl::queue std::queue
#endif

But unfortunalty that’s not working, because the :: is not allowed in the #define macro.
Is there any way to achieve the same thing (be able to specify which implementation I want to use for a specific datastructure) somehow different? I could go for

#define ginstl_list eastl::list

but I would prefer the structure from above! Is there a way (except writing a custom pre-processor) around the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:21:45+00:00Added an answer on May 28, 2026 at 12:21 am

    Developing further on the Mark B’s way (no need to list all types used):

    namespace ginstl
    {
    #if (GIN_USE_EASTL)
        using namespace eastl;
    #else
        using namespace std;
    #endif
        using eastl::string
        using std::queue
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a multi-platform game/visualization framework that uses JavaScript for scripting purposes. The
I'm working on a multiplatform game (PC/iOS/Android) and was looking into using Facebook as
I'm writing a multiplatform ncurses text adventure game. The required C library, ncursesw, is
I've been working on a game engine runtime environment in C++ for my future
I'm writing a 2d tile-based engine. Currently, my drawing routine uses the C# Drawing
Starting a new big C multiplatform project, what rules should one follow to avoid
I'm writing a simple FPS game and I'm going to have the mouse control
I am starting a multiplatform (Win Xp, Linux) qt project. I want to use
I'm looking for a good multiplatform library for vector graphics in C/C++. Any recommendation
I am developing a multi-platform application and in one component I have a class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.