OSDN Git Service
(root)
/
roast
/
roast.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c52dd3e
)
nest_type/get.hpp 実装
author
Myun2
<myun2@nwhite.info>
Mon, 21 May 2012 16:27:55 +0000
(
01:27
+0900)
committer
Myun2
<myun2@nwhite.info>
Mon, 21 May 2012 16:27:55 +0000
(
01:27
+0900)
roast/include/roast/tp/nest_type/get.hpp
patch
|
blob
|
history
diff --git
a/roast/include/roast/tp/nest_type/get.hpp
b/roast/include/roast/tp/nest_type/get.hpp
index
a3f7c38
..
50ee16f
100644
(file)
--- 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 _NestType, int N
>
- typename get_type<_NestType, N>::type
get(
)
+ template <
int N, typename _NestType
>
+ typename get_type<_NestType, N>::type
& ref(_NestType& nest
)
{
+ if ( N == 0 )
+ return nest.value;
+ else
+ return ref<N-1>(nest.next);
}
}
}