Near Matches
Ignore Exact
Everything
2
examples of computations with typelists
(
idea
)
by
ariels
Sun May 13 2001 at 8:35:07
int32
shows how ugly a (nearly)
standard
implementation of a 32-bit
int
type can be in
ISO C
. It's possible to define a
template
d
typedef
to select ints with a desired number of
bit
s: see
Int<bits>
.
fibonaci
defines a nice
C++ multitype
using a
typelist
.
It's
interesting
to note that
typedef
is often
essential
to be able to phrase these constructions! In
C
,
typedef
"just" defines an
alias
for the type, but could theoretically have been removed from the language. But in
C++
typedef
lets you do things that would be impossible had it not been in the language. The examples use
typedef
to "hoist"
type
s out of a typelist at
compile-time
; I know of no other means to do so.
Int<bits>
int32
C++ multitype
template meta-programming
typelist
Template
C++ typedef
Levaquin
The Weakest Link
typedef
Log in
or
register
to write something here or to contact authors.
Sign in
Login
Password
remember me
Lost password
Sign up
Recommended Reading
About Everything2
User Picks
The Losers
Water from fire
Good Intentions Paving Company
Where do you hide when the dark is alive?
Xin Xin Ming
Photographing Copyrights
Editor Picks
Ouroboros
Andy Kaufman
The Elder Scrolls V: Skyrim
I don't care what you've heard: It's hard to get laid in New York City
New Writeups
Port Orford Heads State Park
(
place
)
by
Glowing Fish
Proprietary CD-ROM interface
(
thing
)
by
Zorin
fishing at night
(
personal
)
by
corvus
Operation Popeye
(
event
)
by
borgo
May 22, 2013
(
personal
)
by
go ahead I'll listen
Faint of heart
(
poetry
)
by
etouffee
imagination
(
idea
)
by
arcanamundi
Pandeism and the world of Doctor Who
(
essay
)
by
Pandeism Fish
thoughts while cutting my daughter's hair
(
poetry
)
by
mat_catastrophe
May 21, 2013
(
log
)
by
just1wheat
thoughts while cutting my daughter's hair
(
person
)
by
jessicaj
Star Trek Into Darkness
(
review
)
by
JD
thoughts while cutting my daughter's hair
(
personal
)
by
borgo
May 21, 2013
(
log
)
by
ALittleHawk
IN THE GRIM FUTURE OF HELLO KITTY, THERE IS ONLY WAR.
(
fiction
)
by
arcanamundi
(
more
)