diff --git a/example/performance/accumulate.cpp b/example/performance/accumulate.cpp index 6e3d9f80..45aa1a11 100644 --- a/example/performance/accumulate.cpp +++ b/example/performance/accumulate.cpp @@ -15,6 +15,8 @@ #include #include +#include + #include #include #include @@ -75,14 +77,15 @@ namespace return result / iter; } - struct poly_add { + template + struct result; + template - struct result - { - typedef Lhs type; - }; + struct result + : boost::remove_reference + {}; template Lhs operator()(const Lhs& lhs, const Rhs& rhs) const @@ -93,11 +96,13 @@ namespace struct poly_mult { + template + struct result; + template - struct result - { - typedef Lhs type; - }; + struct result + : boost::remove_reference + {}; template Lhs operator()(const Lhs& lhs, const Rhs& rhs) const diff --git a/example/performance/functional.cpp b/example/performance/functional.cpp index cb4c2ab9..e16d764d 100644 --- a/example/performance/functional.cpp +++ b/example/performance/functional.cpp @@ -13,8 +13,8 @@ #include #include #include -#include +#include #include #include #include @@ -264,12 +264,6 @@ int main() std::cout << "without random access " << call_fused(f,res) << std::endl; total += res; } - { - typedef boost::fusion::vector s; - boost::fusion::unfused_typed f; - std::cout << "unfused_typed " << call_unfused(f,res) << std::endl; - total += res; - } { boost::fusion::unfused_rvalue_args f; std::cout << "unfused_rvalue_args " << call_unfused(f,res) << std::endl; @@ -296,13 +290,6 @@ int main() std::cout << "without random access " << call_fused(f,res) << std::endl; total += res; } - std::cout << std::endl << "Loopback:" << std::endl; - { - typedef boost::fusion::vector s; - boost::fusion::unfused_typed< boost::fusion::fused_function_object, s > f; - std::cout << "unfused_typed,s > " << call_unfused(f,res) << std::endl; - total += res; - } { boost::fusion::unfused_rvalue_args< boost::fusion::fused_function_object > f; std::cout << "unfused_rvalue_args > " << call_unfused(f,res) << std::endl; diff --git a/example/performance/inner_product.cpp b/example/performance/inner_product.cpp index b84eabde..9b9937eb 100644 --- a/example/performance/inner_product.cpp +++ b/example/performance/inner_product.cpp @@ -16,6 +16,8 @@ #include #include +#include + #include #include #include @@ -37,11 +39,13 @@ namespace { struct poly_add { + template + struct result; + template - struct result - { - typedef Lhs type; - }; + struct result + : boost::remove_reference + {}; template Lhs operator()(const Lhs& lhs, const Rhs& rhs) const @@ -52,11 +56,13 @@ namespace struct poly_mult { + template + struct result; + template - struct result - { - typedef Lhs type; - }; + struct result + : boost::remove_reference + {}; template Lhs operator()(const Lhs& lhs, const Rhs& rhs) const diff --git a/example/performance/inner_product2.cpp b/example/performance/inner_product2.cpp index 9bab438e..3e952c07 100644 --- a/example/performance/inner_product2.cpp +++ b/example/performance/inner_product2.cpp @@ -16,6 +16,8 @@ #include #include +#include + #include #include #include @@ -37,11 +39,13 @@ namespace { struct poly_add { + template + struct result; + template - struct result - { - typedef Lhs type; - }; + struct result + : boost::remove_reference + {}; template Lhs operator()(const Lhs& lhs, const Rhs& rhs) const @@ -52,11 +56,13 @@ namespace struct poly_mult { + template + struct result; + template - struct result - { - typedef Lhs type; - }; + struct result + : boost::remove_reference + {}; template Lhs operator()(const Lhs& lhs, const Rhs& rhs) const @@ -110,14 +116,16 @@ namespace struct poly_combine { + template + struct result; + template - struct result - { - typedef Rhs type; - }; + struct result + : boost::remove_reference + {}; template - typename result::type + typename result::type operator()(const Lhs& lhs, const Rhs& rhs) const { return rhs + boost::fusion::at_c<0>(lhs) * boost::fusion::at_c<1>(lhs); diff --git a/example/performance/sequence_efficiency.cpp b/example/performance/sequence_efficiency.cpp index 9e1d34c8..28b5ec82 100644 --- a/example/performance/sequence_efficiency.cpp +++ b/example/performance/sequence_efficiency.cpp @@ -13,6 +13,8 @@ #include #include +#include + #include #include #include @@ -59,11 +61,13 @@ namespace { struct poly_add { + template + struct result; + template - struct result - { - typedef Lhs type; - }; + struct result + : boost::remove_reference + {}; template Lhs operator()(const Lhs& lhs, const Rhs& rhs) const