From dbbda45f4451705f8da646c0b6e5839c1d24731c Mon Sep 17 00:00:00 2001 From: Myun2 Date: Tue, 22 May 2012 01:27:55 +0900 Subject: [PATCH] =?utf8?q?nest=5Ftype/get.hpp=20=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- roast/include/roast/tp/nest_type/get.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/roast/include/roast/tp/nest_type/get.hpp b/roast/include/roast/tp/nest_type/get.hpp index a3f7c382..50ee16f1 100644 --- a/roast/include/roast/tp/nest_type/get.hpp +++ b/roast/include/roast/tp/nest_type/get.hpp @@ -11,9 +11,13 @@ namespace roast { namespace _nest_type { - template - typename get_type<_NestType, N>::type get() + template + typename get_type<_NestType, N>::type& ref(_NestType& nest) { + if ( N == 0 ) + return nest.value; + else + return ref(nest.next); } } } -- 2.11.0