This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++11] Reclaiming fixed-point suffixes for user-defined literals.


On Sun, Nov 6, 2011 at 10:07 AM, Ed Smith-Rowland <3dw4rd@verizon.net> wrote:

> I think it would be very possible to have a general template library for C++
> that would handle a range of sizes and granularities. ?There would be a few
> combinations that would correspond to the C types. ?These would use the
> hardware implementation by template specialization.

There is widespread (unfounded) belief in some community
that a library datatype MUST be inefficient, because otherwise
it would have been builtin.  By the same token, there is a
widespread belief that if a builtin datatype cannot be library based.
Often, these people get into complete disbelief disorder when it is
reveled to them, that on quite descent platforms, the support
for a builtin type will be mostly library.  Conversely, they do not want to
believe that a library facility can receive special treatment from a compiler.
Unless that facility is from C, in which case it is OK, because C is
builtin anyway.

Someone mentioned _Bool and _Static_assert and wonders whether
C and C++ standards committees talk to each other.  They do.  At
least they have formal liaisons.   What is less appreciated though is
that the two community have different cultures
There are lot of reasons why they come to
different solutions (and the respective communities would expect
different solutions.)  The cultures are very different.  The C++
community tend to believe in libraries and general abstraction
facilities with wide range application.  The C community tend to believe
more in builtin type specifiers.

The fact that the communities intersect is no guarantee that they
have to come to the same solutions.  Furthermore, it is often
under-appreciated that C++ has vibrant embedded system
community (even issued embedded system TR) and templates
 are far more prominent roles there than the urban legends let it
know, or one would guess from some depiction of "the" embedded world.

Someone mentioned _Complex.  But _Complex has its own
issues with C++ language rules and library.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]