Tagged Questions
-3
votes
2answers
181 views
Why is C++ preferred over C for commercial applications?
I program in C mostly. However, it is pretty obvious that many more commercial applications are done in C++.
As far as I can tell, C++ is a very complex and even an ugly language. It seems like it ...
7
votes
2answers
255 views
How do I avoid writing lots of pass-through functions in a wrapper?
I have a class, which wraps another class of a common base type. Because the base type interface is quite large this involves writing a lot of pass-through functions. I am looking for a way to avoid ...
5
votes
3answers
450 views
How do you handle increasingly long compile times when working with templates?
I use Visual Studio 2012 and he have cases where we added templates parameters to a class "just" in order to introduce a "seam point" so that in unit-test we can replace those parts with mock objects.
...
6
votes
1answer
81 views
How can I port msvc++ code with non-dependent names in templates to Linux?
I can deal with porting platform dependent functions. I have a problem that the compilers I tried on Linux (clang and g++) do not accept the following code, while the msvc++ compiler does:
template ...
7
votes
8answers
996 views
Is STL implemented with OO?
There are several design patterns like Adaptor, Iterator implemented in STL.
Does that mean STL is implemented with OO concepts?
What is the relationship between OO and template parts of C++?
I ...
5
votes
5answers
593 views
Would “Efficient C++” book be irrelevant now due to compiler improvements?
I am planning on purchasing this book to learn more about C++ programming with regards to fast code. However, the book was published in 1999 and I am worried most of it may be irrelevant now due to ...
1
vote
1answer
186 views
How should the cppcms template hierarchy be used
I understand that the hierarchy, in cppcms for templates, goes skin (topmost, representing a namespace), then view (representing a class) and finally template (representing a function).
I want to ...
12
votes
7answers
731 views
How to spread awareness for generic programming among team members?
I am staying in an environment, where people believe:
Java generics are the feature exclusively used for library writing
and not for the real coding.
C++ is an OO programming language; template is ...
5
votes
2answers
544 views
In C++, were SFINAE and metaprogramming intentional or just a byproduct of templates?
SFINAE and template metaprogramming can do wonderful things and many libraries also use them considerably.
Historically both of these "magic concepts" were intentionally introduced/supported in C++ ? ...
8
votes
9answers
374 views
Are there any resources on how to identify problems that could best be solved with templates?
I decided to improve my knowledge in template meta-programming. I know the syntax and rules and been playing with counteless examples from online resources.
I understand how powerful templates can be ...
2
votes
2answers
543 views
Template Functions and Function templates in C++
I came across a question which asked the difference between Function Templates and Template Functions in C++ and also Template Classes and Class Templates.
I was under the impression that Function ...
17
votes
5answers
968 views
Why C++ cannot adopt D's approach for its concept implementation?
As many of you guys know, concepts, C++'s approach for constraining possible types for a template argument has failed to be included in C++11.
I learned that the D programming language 2.0 has a ...
10
votes
4answers
1k views
Why are C++ template error messages so horrific?
C++ templates are notorious for generating long, unreadable error messages. I have a general idea of why template error messages in C++ are so bad. Essentially, the problem is that the error isn't ...
13
votes
5answers
2k views
Are C++ templates just a kind of glorified macros?
From different comparisons among C++ templates and C#/Java generics like this one-
...