From 034bd6f7e41c36f6428145a0caa40e8f55d6e5a7 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Tue, 6 Dec 2011 19:55:08 +0900 Subject: [PATCH] =?UTF-8?q?types::rebind=5Ftypes=20=E3=81=AE=20tuple=20?= =?UTF-8?q?=E3=81=AB=E5=AF=BE=E3=81=99=E3=82=8B=E7=89=B9=E6=AE=8A=E5=8C=96?= =?UTF-8?q?=E3=81=8C=E6=8A=9C=E3=81=91=E3=81=A6=E3=81=84=E3=81=9F=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sprout/tuple/traits.hpp | 19 +++++++++++++++++++ sprout/type/rebind_types.hpp | 14 ++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/sprout/tuple/traits.hpp b/sprout/tuple/traits.hpp index 8aadb17f..c47ae9e0 100644 --- a/sprout/tuple/traits.hpp +++ b/sprout/tuple/traits.hpp @@ -5,6 +5,25 @@ #include #include +namespace sprout { + namespace types { + // + // rebind_types + // + template + struct rebind_types > { + public: + template + struct apply { + public: + typedef sprout::tuples::tuple type; + }; + }; + } // namespace types + + using sprout::types::rebind_types; +} // namespace sprout + namespace sprout { namespace tuples { // diff --git a/sprout/type/rebind_types.hpp b/sprout/type/rebind_types.hpp index e44e69ef..0c8b339a 100644 --- a/sprout/type/rebind_types.hpp +++ b/sprout/type/rebind_types.hpp @@ -12,6 +12,20 @@ namespace sprout { template struct rebind_types; + template + struct rebind_types { + public: + template + struct apply { + public: + typedef typename sprout::types::rebind_types< + Tuple + >::template apply< + Types... + >::type const type; + }; + }; + template struct rebind_types > { public: