모든 자료형을 담을수 있는 텝플릿 클래스

namespace boost
{
 class bad_any_cast;
 class any;
 template<typename T> T any_cast(any &);
 template<typename T> T any_cast(const any &);
 template<typename ValueType> const ValueType * any_cast(const any *);
 template<typename ValueType> ValueType * any_cast(any *);
 template<typename ValueType> ValueType * unsafe_any_cast(any *);
 template<typename ValueType> const ValueType * unsafe_any_cast(const any *);
}

사용 예제
http://www.boost.org/doc/libs/1_49_0/doc/html/any/s02.html

값을 꺼내올때는 any_cast()를 해야 한다.
any_cast()를 할때마다 내부에서 스트링연산 혹은 그에 준하는 연산을 한다.
런타임 시간에 매번 값을 꺼내오려면 꽤나 많은 비용을 지불해야 할거 같다.

아직 용도는 찾지 못하고 있다.


http://www.boost.org/doc/libs/1_49_0/doc/html/any.html

'Develop' 카테고리의 다른 글

lambda 메모리?  (0) 2012.05.30
hg convert  (0) 2012.05.04
컴파일러 버젼 Define  (0) 2012.01.13
VisualStudio2010 Add-In : Dockable Form 띄우기  (0) 2011.11.07
python simple web server  (0) 2011.10.03

+ Recent posts