Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62052 - sandbox/numeric_bindings/boost/numeric/bindings
From: rutger_at_[hidden]
Date: 2010-05-17 03:14:15


Author: rutger
Date: 2010-05-17 03:14:13 EDT (Mon, 17 May 2010)
New Revision: 62052
URL: http://svn.boost.org/trac/boost/changeset/62052

Log:
Added an initial index_base free function.

Added:
   sandbox/numeric_bindings/boost/numeric/bindings/index_base.hpp (contents, props changed)
Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/tag.hpp | 1 +
   1 files changed, 1 insertions(+), 0 deletions(-)

Added: sandbox/numeric_bindings/boost/numeric/bindings/index_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/index_base.hpp 2010-05-17 03:14:13 EDT (Mon, 17 May 2010)
@@ -0,0 +1,35 @@
+//
+// Copyright (c) 2010 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_INDEX_BASE_HPP
+#define BOOST_NUMERIC_BINDINGS_INDEX_BASE_HPP
+
+#include <boost/numeric/bindings/detail/adaptor.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace result_of {
+
+template< typename T >
+struct index_base {
+ typedef typename detail::property_at< T, tag::index_base >::type type;
+};
+
+} // namespace result_of
+
+template< typename T >
+typename result_of::index_base<T>::type index_base( const T& ) {
+ return result_of::index_base<T>::type();
+}
+
+} // namespace bindings
+} // namespace numeric
+} // namespace boost
+
+#endif

Modified: sandbox/numeric_bindings/boost/numeric/bindings/tag.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/tag.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/tag.hpp 2010-05-17 03:14:13 EDT (Mon, 17 May 2010)
@@ -108,6 +108,7 @@
 ADD_TAG( index_major )
 ADD_TAG( compressed_index_major )
 ADD_TAG( index_minor )
+ADD_TAG( index_base )
 
 namespace tag {
 


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