Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58665 - sandbox/numeric_bindings/boost/numeric/bindings/detail
From: rutger_at_[hidden]
Date: 2010-01-04 03:49:43


Author: rutger
Date: 2010-01-04 03:49:42 EST (Mon, 04 Jan 2010)
New Revision: 58665
URL: http://svn.boost.org/trac/boost/changeset/58665

Log:
added basic_unwrapper for upper, lower, etc.

Added:
   sandbox/numeric_bindings/boost/numeric/bindings/detail/basic_unwrapper.hpp (contents, props changed)

Added: sandbox/numeric_bindings/boost/numeric/bindings/detail/basic_unwrapper.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/detail/basic_unwrapper.hpp 2010-01-04 03:49:42 EST (Mon, 04 Jan 2010)
@@ -0,0 +1,56 @@
+//
+// Copyright (c) 2009 Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_DETAIL_BASIC_UNWRAPPER_HPP
+#define BOOST_NUMERIC_BINDINGS_DETAIL_BASIC_UNWRAPPER_HPP
+
+#include <boost/numeric/bindings/begin.hpp>
+#include <boost/numeric/bindings/end.hpp>
+#include <boost/numeric/bindings/size.hpp>
+#include <boost/numeric/bindings/stride.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace detail {
+
+template< typename T, typename Id >
+struct basic_unwrapper {
+
+ static typename result_of::size1< T >::type size1( const Id& id ) {
+ return bindings::size1( id.get() );
+ }
+
+ static typename result_of::size2< T >::type size2( const Id& id ) {
+ return bindings::size2( id.get() );
+ }
+
+ static typename result_of::stride1< T >::type stride1( const Id& id ) {
+ return bindings::stride1( id.get() );
+ }
+
+ static typename result_of::stride2< T >::type stride2( const Id& id ) {
+ return bindings::stride2( id.get() );
+ }
+
+ static typename result_of::begin_value< T >::type begin_value( Id& id ) {
+ return bindings::begin_value( id.get() );
+ }
+
+ static typename result_of::end_value< T >::type end_value( Id& id ) {
+ return bindings::end_value( id.get() );
+ }
+
+};
+
+} // namespace detail
+} // namespace bindings
+} // namespace numeric
+} // namespace boost
+
+#endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk