Search Results for '문법강조'

1 POSTS

  1. 2008/06/06 Syntax Highlighter 설치 (2)

Syntax Highlighter 설치

2008/06/06 15:39

블로그에 Syntax Highlighter를 설치한 기념으로 잘 나오나 확인할 겸 포스팅.

template <unsigned long n>
struct binary
{
	static unsigned const value =
		binary<n/10>::value << 1 | N%10;
};

template <>
struct binary<0>
{
	static unsigned const value = 0;
};

unsigned const one   =    binary<1>::value;
unsigned const three =   binary<11>::value;
unsigned const five  =  binary<101>::value;
unsigned const seven =  binary<111>::value;
unsigned const nine  = binary<1001>::value;

이 글저 글을 보고 따라했다. 위 예제는 C++ Template Metaprogramming에 나오는 예제 중 하나. (꽤나 변태스럽고 무시무시한 코드다. 템플릿 메타프로그래밍은 너무 심오하다.)

문법 강조도 되겠다~ 앞으로는 이쁜 코드들을 올려야지.. -_-;

p.s.1. 헉. 안나온다. 왜 안나와. 나와라 나와라 나와라.
p.s.2. 고쳤다. ㅎㅎ 이제 칼라풀하게 나온다.
p.s.3. 아.. RSS에서는 칼라풀하게 안나오는구나. ㅠㅠ