C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
chapter1::binary< N > Struct Template Reference

Prepend higher bits to lowest bit. More...

Static Public Attributes

static unsigned const value = (binary<N/10>::value * 2) + (N % 10)
 

Detailed Description

template<unsigned long N>
struct chapter1::binary< N >

Prepend higher bits to lowest bit.

Template Parameters
NA binary number to examine. Obvisouly, this should contain only 0 and 1.

Definition at line 46 of file chapter-1.cpp.

Member Data Documentation

◆ value

template<unsigned long N>
unsigned const chapter1::binary< N >::value = (binary<N/10>::value * 2) + (N % 10)
static

Definition at line 48 of file chapter-1.cpp.


The documentation for this struct was generated from the following file: