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

  • Home
  • SEARCH
  • 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 107813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:48:47+00:00 2026-05-11T01:48:47+00:00

Should I make my own framework by wrapping up the STL classes and/or Boost

  • 0

Should I make my own framework by wrapping up the STL classes and/or Boost libraries so that if I need to change the implementation of the string, vectors, lists, etc. or I need to write functions that MFC, other other libraries or even other platforms would need to use their format, I can easily mutate them to meet the criteria. this is what I’m thinking.

// In my framework: namespace MyFX {      typedef std::string String; };  // Port specific (MFC in this case) CString ToCString(const MyFx::String &str) { /* magic */ }  // Port specific (.NET specific) System::String^ ToManagedString(const MyFx::String &str) { /* magic */ } 

Am I reinventing the wheel too much?

I would use the MyFx::String in UI interfaces between the UI and the other layers.

  • 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. 2026-05-11T01:48:48+00:00Added an answer on May 11, 2026 at 1:48 am

    It seems to me like there won’t be a lot of benefit to this; in my experience, the point of using these frameworks is so that you don’t go reinventing the wheel. If you find that you need to write a new string class or a new vector class, you should think really hard about it, and make sure you’re not just doing something else wrong. I’m not saying there’s never a reason to write your own string class, I’m just saying it’s rare. Given that, I would suggest just using the desired frameworks directly.

    Regarding the conversion functions, I believe the compiler won’t see your ToCString function any differently than it would see this:

    CString ToCString( const std::string & ) {...} 

    This is because a C++ typedef does not create a new type, just an alias to an existing type.

    Further Thoughts

    I think the concern you voice here is a very natural one, and I know it has come up in my team several times. However, I think the answer is still as stated above.

    While the STL classes are probably not perfect, they were designed by very smart people, who put quite a lot of thought into the task. Thus, the odds of you needing to write a full replacement string class are very small. Furthermore, and without intending any slight, it would take you (or me) a very long time to implement a robust general-purpose string class that could suitably replace std::string.

    Another possible way to think about it would be this: would you consider ‘replacing’ the String class in Java or C#? I think the answer there is clearly ‘no’, although there may be occasional limited areas where you use something other than a String to represent a sequence of characters. Same thing goes here: std::string is as close as C++ gets to a built-in string class, and you almost assuredly don’t need to replace it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 130k
  • Answers 130k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can use: [tabBarController setSelectedIndex:(int)]; The numbering of tabs starts… May 12, 2026 at 6:09 am
  • Editorial Team
    Editorial Team added an answer The best solution will depend on what you know about… May 12, 2026 at 6:09 am
  • Editorial Team
    Editorial Team added an answer Instead of using jQuery, this can all be done in… May 12, 2026 at 6:09 am

Related Questions

I'm currently working on my Bachelors dissertation. This involves developing a software product and
I'm in the process of developing my first major project. It's a light-weight content
Summary: Can I program a thick client game in C without reinventing wheels ,
I am relatively new to MVC, so this is likely a novice question. I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.