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 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

Related Questions

Some people have suggested that when doing an estimate one should make a lower
When should I continue to make derived classes, and when should I just add
A sysadmin teacher told me one day that I should learn to use make
I am building a search box (input field) which should make a server call
What CSS should I use to make a cell's border appear even if the
If I make two iPhone applications, how can/should I share custom data (not contacts
I want to make the line marked with // THIS LINE SHOULD BE PRINTING
What do you think - which functions should be implemented to make work with
Is it possible to make such buttons ( http://img225.imageshack.us/img225/6452/buttonslw9.jpg ) using CSS? It should
I'm fixing a User control component using the .NET 1.1 framework. There are many

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.