// // 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_NOOP_HPP #define BOOST_NUMERIC_BINDINGS_NOOP_HPP #include #include #include namespace boost { namespace numeric { namespace bindings { namespace detail { template< typename T > struct noop_wrapper: adaptable_type< noop_wrapper >, reference_wrapper { noop_wrapper( T& t ): reference_wrapper( t ) {} }; template< typename T, typename Id, typename Enable > struct adaptor< noop_wrapper, Id, Enable >: basic_unwrapper< T, Id > { typedef typename property_map_of< T >::type property_map; }; } // namespace detail namespace result_of { template< typename T > struct noop { typedef detail::noop_wrapper type; }; } // namespace result_of template< typename T > detail::noop_wrapper const noop( T& underlying ) { return detail::noop_wrapper( underlying ); } template< typename T > detail::noop_wrapper const noop( const T& underlying ) { return detail::noop_wrapper( underlying ); } } // namespace bindings } // namespace numeric } // namespace boost #endif