Added local copy of preprocessor introduction from the C++ Template Metaprogramming Book Appendix A

This commit is contained in:
Edward Diener
2015-05-20 17:19:31 -04:00
parent 915ab7834c
commit 106f5a43a1
8 changed files with 39 additions and 709 deletions

View File

@ -4,9 +4,6 @@
lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head> <head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" /> <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
<script type="text/javascript" src="Appendix%20A%20%C2%A0%20An%20Introduction%20to%20Preprocessor%20Metaprogramming_files/analytics.js"></script>
<script type="text/javascript">archive_analytics.values.server_name="wwwb-app3.us.archive.org";archive_analytics.values.server_ms=358;</script>
<link type="text/css" rel="stylesheet" href="Appendix%20A%20%C2%A0%20An%20Introduction%20to%20Preprocessor%20Metaprogramming_files/banner-styles.css" />
<meta name="generator" content="Docutils 0.3.8: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils 0.3.8: http://docutils.sourceforge.net/" />
<title>Appendix A   An Introduction to Preprocessor Metaprogramming</title> <title>Appendix A   An Introduction to Preprocessor Metaprogramming</title>
<meta name="copyright" content="From &quot;C++ Template Metaprogramming,&quot; by David Abrahams and Aleksey Gurtovoy. Copyright (c) 2005 by Pearson Education, Inc. Reprinted with permission." /> <meta name="copyright" content="From &quot;C++ Template Metaprogramming,&quot; by David Abrahams and Aleksey Gurtovoy. Copyright (c) 2005 by Pearson Education, Inc. Reprinted with permission." />

View File

@ -1,49 +0,0 @@
var archive_analytics = {
startTime: new Date(),
img_src: "//analytics.archive.org/0.gif",
values: { service: 'wb' },
onload_func: function() {
var now = new Date();
var loadtime = now - archive_analytics.startTime;
var v = archive_analytics.values;
v.loadtime = loadtime;
v.timediff = -(now.getTimezoneOffset()/60);
v.locale = archive_analytics.get_locale();
// if no referrer set '-' as referrer
v.referrer = document.referrer || '-';
var string = archive_analytics.format_bug(v);
var loadtime_img = new Image(100,25);
loadtime_img.src = archive_analytics.img_src + "?" + string;
},
format_bug: function(values) {
var ret = ['version=2'], count = 2;
for (var data in values) {
ret.push(encodeURIComponent(data) + "=" + encodeURIComponent(values[data]));
count = count + 1;
}
ret.push('count=' + count);
return ret.join("&");
},
get_locale: function() {
if (navigator) {
return navigator.language || navigator.browserLanguage ||
navigator.systemLanguage || navigator.userLanguage || '';
}
return '';
},
get_cookie: function(name) {
var parts = document.cookie.split(name + "=");
if (parts.length == 2) return parts.pop().split(";").shift();
return 0;
}
};
if (window.addEventListener) {
window.addEventListener('load', archive_analytics.onload_func, false);
} else if (window.attachEvent) {
window.attachEvent('onload', archive_analytics.onload_func);
}

View File

@ -1,514 +0,0 @@
.__wb_overlay {
filter:alpha(opacity=60); /* IE */
opacity: 0.6; /* Safari, Opera */
-moz-opacity:0.6; /* FireFox */
opacity: 0.6;
background-color: #000;
position: fixed;
width:100%;
height:100%;
top: 0px;
left: 0px;
padding: 0px !important;
border: 0px !important;
margin: 0px !important;
border-radius: 0px !important;
z-index: 2147483643 !important;
}
#__wb_record_overlay_div {
cursor: wait !important;
}
.__wb_record_content {
opacity: 1.0;
position: fixed;
top: 50%;
left: 50%;
margin: 0px !important;
padding: 0px !important;
background-color: #ffffff !important;
border-radius: 8px;
z-index: 2147483644 !important;
box-shadow: 0 0 30px 5px #000;
-moz-box-shadow: 0 0 30px 5px #000;
-webkit-box-shadow: 0 0 30px 5px #000;
}
#__wb_record_content_loader {
cursor: wait !important;
padding-top: 30px !important;
margin-left: -287px !important;
margin-top: -177px !important;
width: 574px !important;
height: 355px !important;
}
#__wb_record_content_done {
margin-left: -427px !important;
margin-top: -177px !important;
width: 855px !important;
height: 355px !important;
}
.__wb_record_content > * {
margin: auto !important;
display: block !important;
text-align: center !important;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}
.__wb_record_content > wb_h1 {
font-size: 36px !important;
color: #222 !important;
margin: 0px 0px 0px 0px !important;
padding: 0px !important;
line-height: 2em;
font-weight: normal !important;
width: auto !important;
height: auto !important;
}
.__wb_record_content > wb_p {
font-size: 17px !important;
color: #222 !important;
margin: 8px 0px 8px 0px !important;
padding: 0px !important;
line-height: 2em;
}
.__wb_record_content > #_wb_logo {
margin-bottom: 10px !important;
}
.__wb_record_content > #_wb_spinner {
margin-top: 30px !important;
margin-bottom: 30px !important;
}
.__wb_record_content > #_wb_curr_url {
text-decoration: underline !important;
font-weight: bold !important;
}
#__wb_record_content_done > #__wb_link {
font-size: 20px !important;
border: 1px !important;
border-color: #aaa !important;
border-style: solid !important;
padding: 3px !important;
text-align: center !important;
width: 80% !important;
height: auto !important;
}
#__wb_record_content_done > #__wb_link:focus {
outline: 0px !important;
border-color: #428bca !important;
}
/* DONATE */
#__wb_record_content_done > #__wb_donate_close {
font-size: 18px !important;
width: auto !important;
float: right;
display: inline-block;
margin: 0px !important;
padding: 8px 8px 0px 0px !important;
}
#__wb_donate_close > #__wb_record_done_close {
cursor: pointer !important;
display: inline-block;
vertical-align: bottom !important;
}
#__wb_record_content_done > #__wb_donate_close a {
color: #428bca !important;
}
#__wb_record_content_done > #__wb_donate_close a:link {
color: #428bca !important;
text-decoration: none !important;
margin-right: 16px !important;
}
#__wb_record_content_done > #__wb_donate_close a:visited {
color: #428bca !important;
}
#__wb_record_content_done > #__wb_donate_close a:hover {
color: #00B1F7 !important;
}
#wm-ipp {
width:100%;
min-height:65px;
min-width:800px;
left:0;
top:0;
padding:0;
margin:0;
border-radius:0;
background-color:transparent;
font-size:11px;
}
#wm-ipp * {
font-family:Lucida Grande, Helvetica, Arial, sans-serif;
font-size:inherit;
line-height:1.2;
width:auto;
outline:none;
float:none;
}
#wm-ipp div, #wm-ipp tr, #wm-ipp td, #wm-ipp a, #wm-ipp form {
padding:0;
margin:0;
border:none;
border-radius:inherit;
background-color:transparent;
background-image:none;
z-index:2147483640;
}
#wm-ipp table {
border:none;
border-collapse:collapse;
margin:0;
padding:0;
width:auto;
font-size:inherit;
}
#wm-ipp form input {
padding:1px;
height:auto;
display:inline;
margin:0;
}
#wm-ipp form input[type=submit] {
padding:0 8px;
margin:1px 0 1px 5px;
width:auto !important;
}
#wm-ipp a:hover{
text-decoration:underline !important;
}
#wm-ipp #wm-ipp-inside {
width:98% !important;
min-width:780px;
margin: 0 auto;
border:5px solid #000;
border-top:none;
background-color:rgba(255,255,255,0.9);
-moz-box-shadow:1px 1px 4px #333;
-webkit-box-shadow:1px 1px 4px #333;
box-shadow:1px 1px 4px #333;
border-radius:0 0 8px 8px;
}
/* selectors are intentionally verbose to ensure priority */
#wm-ipp #wm-logo {
padding:0 10px;
vertical-align:middle;
min-width:110px;
}
#wm-ipp td.c {
vertical-align:top;
width:100%;
}
#wm-ipp td.c td.u {
padding: 3px 0;
text-align:center;
}
#wm-ipp td.c td.n {
padding-left:5px;
}
#wm-ipp td.c td.n a {
text-decoration:none;
color:#33f;
font-weight:bold;
}
#wm-ipp td.c td.n td.b {
padding-right:6px !important;
text-align:right !important;
overflow:visible;
white-space:nowrap;
color:#99a;
vertical-align:middle;
}
#wm-ipp td.c td.n td.c {
background:#000;
color:#ff0;
font-weight:bold;
text-align:center;
}
#wm-ipp.hi td.c td.n td.c {
color:#ec008c;
}
#wm-ipp td.c td.n td.f {
padding-left:6px !important;
text-align:left !important;
overflow:visible;
white-space:nowrap;
color:#99a;
vertical-align:middle;
}
#wm-ipp td.c td.n tr.m td {
text-transform:uppercase;
white-space:nowrap;
padding:2px 0;
}
#wm-ipp td.c td.s {
padding-right:5px;
text-align:center;
vertical-align:bottom;
}
#wm-ipp td.c td.s a.t {
color:#33f;
font-weight:bold;
line-height: 1.8;
}
#wm-ipp td.c td.s div.r {
color: #666;
font-size:9px;
white-space:nowrap;
}
#wm-ipp td.c td.k {
vertical-align:bottom;
padding-bottom:2px;
}
#wm-ipp td.c td.n tr.y td, #wm-ipp td.c td.s {
padding-bottom:2px;
}
div#wm-ipp-sparkline {
position:relative;/* for positioning markers */
white-space:nowrap;
background-color:#fff;
cursor:pointer;
border-right:1px solid #ccc;
line-height:0.9;
}
#sparklineImgId {
position:relative;
z-index:9012;
}
#wm-ipp-sparkline div.yt {
position:absolute;
z-index:9010 !important;
background-color:#ff0 !important;
}
#wm-ipp-sparkline div.mt {
position:absolute;
z-index:9011 !important;
background-color:#ec008c !important;
}
#wm-ipp td.r {
position:relative;
padding-left:65px;/* to push td.c to the left */
}
#wm-ipp td.r a {
display:block;
padding:0 15px 0 0;
color:#33f;
border:none;
position:absolute;
right:5px;
background-color:transparent;
background-repeat:no-repeat !important;
background-position:100% 100% !important;
}
/* Spinner */
#__wb_spinningSquaresG{
position: relative;
width: 240px;
height: 20px;
padding: 0px !important;
margin: 30px 0px 30px 160px !important;
border: 0px !important;
border-radius: 0px !important;
}
.__wb_spinningSquaresG {
margin: 0px !important;
padding: 0px !important;
border: 0px !important;
border-radius: 0px !important;
position:absolute;
top:0;
background-color:#000000;
width:22px;
height:22px;
-moz-animation-name:bounce_spinningSquaresG;
-moz-animation-duration:1.9s;
-moz-animation-iteration-count:infinite;
-moz-animation-direction:linear;
-moz-transform:scale(.3);
-webkit-animation-name:bounce_spinningSquaresG;
-webkit-animation-duration:1.9s;
-webkit-animation-iteration-count:infinite;
-webkit-animation-direction:linear;
-webkit-transform:scale(.3);
-ms-animation-name:bounce_spinningSquaresG;
-ms-animation-duration:1.9s;
-ms-animation-iteration-count:infinite;
-ms-animation-direction:linear;
-ms-transform:scale(.3);
-o-animation-name:bounce_spinningSquaresG;
-o-animation-duration:1.9s;
-o-animation-iteration-count:infinite;
-o-animation-direction:linear;
-o-transform:scale(.3);
animation-name:bounce_spinningSquaresG;
animation-duration:1.9s;
animation-iteration-count:infinite;
animation-direction:linear;
transform:scale(.3);
}
#__wb_spinningSquaresG_1{
left:0;
-moz-animation-delay:0.76s;
-webkit-animation-delay:0.76s;
-ms-animation-delay:0.76s;
-o-animation-delay:0.76s;
animation-delay:0.76s;
}
#__wb_spinningSquaresG_2{
left:30px;
-moz-animation-delay:0.95s;
-webkit-animation-delay:0.95s;
-ms-animation-delay:0.95s;
-o-animation-delay:0.95s;
animation-delay:0.95s;
}
#__wb_spinningSquaresG_3{
left:60px;
-moz-animation-delay:1.14s;
-webkit-animation-delay:1.14s;
-ms-animation-delay:1.14s;
-o-animation-delay:1.14s;
animation-delay:1.14s;
}
#__wb_spinningSquaresG_4{
left:90px;
-moz-animation-delay:1.33s;
-webkit-animation-delay:1.33s;
-ms-animation-delay:1.33s;
-o-animation-delay:1.33s;
animation-delay:1.33s;
}
#__wb_spinningSquaresG_5{
left:120px;
-moz-animation-delay:1.52s;
-webkit-animation-delay:1.52s;
-ms-animation-delay:1.52s;
-o-animation-delay:1.52s;
animation-delay:1.52s;
}
#__wb_spinningSquaresG_6{
left:150px;
-moz-animation-delay:1.71s;
-webkit-animation-delay:1.71s;
-ms-animation-delay:1.71s;
-o-animation-delay:1.71s;
animation-delay:1.71s;
}
#__wb_spinningSquaresG_7{
left:180px;
-moz-animation-delay:1.9s;
-webkit-animation-delay:1.9s;
-ms-animation-delay:1.9s;
-o-animation-delay:1.9s;
animation-delay:1.9s;
}
#__wb_spinningSquaresG_8{
left:210px;
-moz-animation-delay:2.09s;
-webkit-animation-delay:2.09s;
-ms-animation-delay:2.09s;
-o-animation-delay:2.09s;
animation-delay:2.09s;
}
@-moz-keyframes bounce_spinningSquaresG{
0%{
-moz-transform:scale(1);
background-color:#000000;
}
100%{
-moz-transform:scale(.3) rotate(90deg);
background-color:#FFFFFF;
}
}
@-webkit-keyframes bounce_spinningSquaresG{
0%{
-webkit-transform:scale(1);
background-color:#000000;
}
100%{
-webkit-transform:scale(.3) rotate(90deg);
background-color:#FFFFFF;
}
}
@-ms-keyframes bounce_spinningSquaresG{
0%{
-ms-transform:scale(1);
background-color:#000000;
}
100%{
-ms-transform:scale(.3) rotate(90deg);
background-color:#FFFFFF;
}
}
@-o-keyframes bounce_spinningSquaresG{
0%{
-o-transform:scale(1);
background-color:#000000;
}
100%{
-o-transform:scale(.3) rotate(90deg);
background-color:#FFFFFF;
}
}
@keyframes bounce_spinningSquaresG{
0%{
transform:scale(1);
background-color:#000000;
}
100%{
transform:scale(.3) rotate(90deg);
background-color:#FFFFFF;
}
}

View File

@ -1,44 +0,0 @@
function getFrameArea(frame) {
if(frame.innerWidth) return frame.innerWidth * frame.innerHeight;
if(frame.document.documentElement && frame.document.documentElement.clientHeight) return frame.document.documentElement.clientWidth * frame.document.documentElement.clientHeight;
if(frame.document.body) return frame.document.body.clientWidth * frame.document.body.clientHeight;
return 0;
}
function isLargestFrame() {
if(top == self) {
return true;
}
if(top.document.body.tagName == "BODY") {
return false;
}
largestArea = 0;
largestFrame = null;
for(i=0;i<top.frames.length;i++) {
frame = top.frames[i];
area = getFrameArea(frame);
if(area > largestArea) {
largestFrame = frame;
largestArea = area;
}
}
return (self == largestFrame);
}
function disclaimElement(element) {
if(isLargestFrame()) {
element.style.display="block";
document.body.insertBefore(element,document.body.firstChild);
}
}
function disclaimToggle(largest, nonLargest) {
if(isLargestFrame()) {
largest.style.display="block";
nonLargest.style.display="none";
} else {
largest.style.display="none";
nonLargest.style.display="block";
}
}

View File

@ -1,50 +0,0 @@
function getEventX(event) {
var posx = 0;
if (event.pageX || event.pageY) {
posx = event.pageX;
}
else if (event.clientX || event.clientY) {
posx = event.clientX + document.body.scrollLeft
+ document.documentElement.scrollLeft;
}
return posx;
}
function getElementX(obj) {
var x = 0;
if (obj.offsetParent) {
do {
x += obj.offsetLeft;
} while (obj = obj.offsetParent);
}
return x;
}
function zeroPad(str,len) {
var i;
var pad = "";
var s = str.toString();
for(i=s.length; i < len; i++) {
pad = "0".toString() + pad.toString();
}
return pad.toString() + s.toString();
}
function dateToTimestamp(date) {
return date.getFullYear() +
zeroPad(date.getMonth()+1,2) +
zeroPad(date.getDay()+1,2) +
zeroPad(date.getHours(),2) +
zeroPad(date.getMinutes(),2) +
zeroPad(date.getSeconds(),2);
}
function calcTimestamp(event,element,firstMS,lastMS) {
var eventX = getEventX(event);
var elementX = getElementX(element);
var elementWidth = element.width;
var msWidth = lastMS - firstMS;
var x = eventX - elementX;
var pct = x / elementWidth;
var pctDate = pct * msWidth;
var date = pctDate + firstMS;
return dateToTimestamp(new Date(date));
}

File diff suppressed because one or more lines are too long

View File

@ -1,29 +1,38 @@
<html> <html>
<head> <head>
<title>contents.html</title> <meta content="text/html; charset=windows-1252" http-equiv="content-type">
<link rel="stylesheet" type="text/css" href="styles.css"> <title>contents.html</title>
<style> <link rel="stylesheet" type="text/css" href="styles.css">
<style>
a, a:link, a:visited { color: black; font-weight: bold; } a, a:link, a:visited { color: black; font-weight: bold; }
</style> </style>
</head> </head>
<body> <body>
<h4><a href="Appendix%20A%20%C2%A0%20An%20Introduction%20to%20Preprocessor%20Metaprogramming.html"
<h4><a href="http://www.boostpro.com/mplbook/preprocessor.html" target="_top">Introduction</a></h4> target="_top">Introduction</a></h4>
<h4><a href="topics.html">Topics</h4> <h4><a href="topics.html">Topics</a></h4>
<h4><a href="terms.html">Terminology</h4> <a href="topics.html">
<h4><a href="data.html">Data Types</h4> </a>
<h4><a href="ref.html">Reference</h4> <h4><a href="topics.html"></a><a href="terms.html">Terminology</a></h4>
<h4><a href="headers.html">Headers</h4> <a href="terms.html">
<h4><a href="examples.html">Examples</h4> </a>
<h4><a href="miscellanea.html">Miscellanea</h4> <h4><a href="terms.html"></a><a href="data.html">Data Types</a></h4>
<a href="data.html">
<!-- </a>
<EFBFBD> Copyright Housemarque Oy 2002 <h4><a href="data.html"></a><a href="ref.html">Reference</a></h4>
<EFBFBD> Copyright Paul Mensonides 2002 <a href="ref.html">
Distributed under the Boost Software License, Version 1.0. </a>
(See accompanying file LICENSE_1_0.txt or copy at <h4><a href="ref.html"></a><a href="headers.html">Headers</a></h4>
http://www.boost.org/LICENSE_1_0.txt) <a href="headers.html">
--> </a>
<h4><a href="headers.html"></a><a href="examples.html">Examples</a></h4>
</body> <a href="examples.html">
</html> </a>
<h4><a href="examples.html"></a><a href="miscellanea.html">Miscellanea</a></h4>
<a href="miscellanea.html">
<!--
<EFBFBD> Copyright Housemarque Oy 2002<30> Copyright Paul Mensonides 2002
Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)--> </a>
</body>
</html>

View File

@ -1,5 +1,6 @@
<html> <html>
<head> <head>
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
<title>title.html</title> <title>title.html</title>
<link rel="stylesheet" type="text/css" href="styles.css"> <link rel="stylesheet" type="text/css" href="styles.css">
</head> </head>
@ -11,15 +12,14 @@
may be used as a standalone library. </div> may be used as a standalone library. </div>
<div> An excerpt from <i>C++ Template Metaprogramming: Concepts, Tools, and <div> An excerpt from <i>C++ Template Metaprogramming: Concepts, Tools, and
Techniques from Boost and Beyond</i> by Dave Abrahams and Aleksey Techniques from Boost and Beyond</i> by Dave Abrahams and Aleksey
Gurtovoy has been made available <a href="http://www.boostpro.com/mplbook/preprocessor.html" Gurtovoy has been made <a href="Appendix%20A%20%C2%A0%20An%20Introduction%20to%20Preprocessor%20Metaprogramming.html"
target="_top"><font color="blue"><b><u><i>online</i></u></b></font></a>. target="_top"><font color="blue"><b><u><i>available</i></u></b></font></a>.
This excerpt contains a basic introduction to the Preprocessor library and This excerpt contains a basic introduction to the Preprocessor library and
preprocessor metaprogramming which may help users new to the library and preprocessor metaprogramming which may help users new to the library and
users interested in seeing some of the facilities offered by the library. users interested in seeing some of the facilities offered by the library.
</div> </div>
<!-- <!--
<EFBFBD> Copyright Housemarque Oy 2002<30> Copyright Paul Mensonides 2002 <EFBFBD> Copyright Housemarque Oy 2002<30> Copyright Paul Mensonides 2002Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at
Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)--> http://www.boost.org/LICENSE_1_0.txt)-->
</body> </body>
</html> </html>