The Wayback Machine - https://web.archive.org/web/20080915115038/http://www.byte.com:80/wilson/
BYTE.com
RSS feed

Newsletter
Free E-mail Newsletter from BYTE.com
Email Address
First Name
Last Name




����
BYTE.com > Flexible C++

Flexible C++
Matthew Wilson

My approach to software engineering is far more pragmatic than it is theoretical, and I've no doubt that this column will reflect that. (That's double-speak for "I don't know what I'm talking about half the time"!) It's my belief that all languages are imperfect, and that C++ is no exception.

Where C++ has the advantage over other languages is in its support for close-to-the bone efficiency and at the same time supporting the expression of high-level concepts. It also has its own built-in self-repair mechanism in its powerful (though still imperfect) templates mechanism.

So as well as providing you with some useful efficient code, the intent in this column is to share with you the various pros and cons of the solutions presented in the hope that you may find some of it illuminating. (There's not much point in having a column if you can't achieve that every now and then, one would think!)

Footprints in the Butter: Part II
In his previous installment, Matthew focused on code bloat in source code. This month, he looks at object code size.

Flexible C++ #12: Imperfect enums, Part 2: Forward Declarations
This second part of the Imperfect Enums series looks at the issue of the forward declaration of enumerations. Why would one ever want to do that, I hear you cry? Certainly it's not a common need. But I have encountered situations where it's required, one of which we'll discuss later.

Flexible C++ #11: Imperfect enums, part 1: Declarations, Definitions, and Namespace Leakage
Welcome to a series on enumerations in C and C++, in which I cover their uses, good practices for managing them, and two imperfections in the way the language handles them. In this first installment, I cover the overview of enumerations, and examine the first imperfection: the leakage of enumeration symbol names into the surrounding namespace.

Flexible C++ #8: Union Casts Considered Harmful, but Necessary
Unions in C and C++ are aggregate quantities like structs, except that each element of the union has offset 0, and the total size of the union is only as large as is required to hold its largest member [1]. Only one member of a union may be "active" at a time.

Flexible C++ #7: Handling Parameter Sets in Member Initializer Lists: With A Little Help From MUMI!
In the recls mapping, the invariants are only forced by assertions. Now, with a little help from MUMI, you can have your flexibility without sacrificing the robustness you get from using MILs.

Flexible C++ #6: Flexible Implementations Without Using Directives
It is widely accepted that using directives are an unacceptable part of the public interface of library code. This is because a using directive indiscriminately makes visible all symbols within the referenced namespace from the point of directive declaration, raising the potential for symbol clash (which is what namespaces were created to circumvent).

Flexible C++ #5: Friendly Templates
Matthew looks at the subject of friendly templates from the perspective of granting friendship from a template to one of the template's parameterizing types.

Flexible C++ #4: Efficient Integer To String Conversions
This is the final installment in the integer-to-string series. The previous two installments and the original article described different approaches to the efficient conversion of integers into strings. This time arround, I continue with the "Flexible C++" philosophy, and consider one last variation.

Flexible C++ #3: Efficient Integer to String Conversions
Matthew looks at more integer to string conversion options, including his candidate for the �optimum solution.�

Flexible C++ #2: Efficient Integer to String Conversions, part 3
In this inaugural installment of a new Experts series, Matthew Wilson presents a fast and useful technique for converting integers to strings.

Flexible C++ #1: Efficient Integer to String Conversions
The fastest to_string in town.




BYTE.com > Flexible C++
Dr. Dobb's Media Center

Extending Enterprise Value with Web 2.0
In this webcast we will talk about how to simply build and quickly remix Web 2.0 applications and the role of the IT department and how they support mashups. We will discuss how IBM can help IT teams adapt existing enterprise systems as well as develop unique ones that can support end user driven mashups in a reliable, scalable and secure way. We will highlight a simple scenario adapting an enterprise information source for mashups and how to test it. We will also cover how IBM can help you build agile, fast and simple web applications based on dynamic scripting languages that dramatically reduces development time. Wednesday, September 24, 2008 - 12pm PT / 3pm ET

2008 International Mathematica Conference
Dr. Dobb's interviews Wolfram Research's Theo Gray, co-founder and Director of User Interfaces, and Roger Germundsson, Director of Research and Development, about the upcoming 2008 International Mathematica Conference.

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
The Best of BYTE: Volume 2 - Heuristic Algorithms
The Best of BYTE: Volume 2 - Heuristic Algorithms
In this volume of Best of BYTE, we explore the emergence of some heuristic algorithms. Although we have only scratched the surface of this intriguing subject, we hope we've suggested the potential of the synthesis of heuristics and algorithms.

� 2008 Think Services, Privacy Policy, Terms of Service, United Business Media Limited
Site comments: [email protected]
Web Sites: BYTE.com, dotnetjunkies.com, Dr. Dobb's Journal, SD Expo, Sys Admin, sqljunkies.com, Unixreview



MarketPlace
simple helix is the most trusted name in the hosting industry! Join us and host with the experts!
Sign Up & Get Full Access To The Definitive Online Book Collection With SkillSoft's Books24x7�.
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Fast online exception analysis. Capture customer crash data online.
and develop 10 times faster ! ALM, IDE, .Net, PDF, 5GL, Database, 64-bit, etc. Free Express version
Wanna see your ad here?


web2