$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r67596 - trunk/boost/ratio/mpl
From: vicente.botet_at_[hidden]
Date: 2011-01-02 15:50:40
Author: viboes
Date: 2011-01-02 15:50:40 EST (Sun, 02 Jan 2011)
New Revision: 67596
URL: http://svn.boost.org/trac/boost/changeset/67596
Log:
Boost.Ratio: Added mpl numeric_cast
Added:
   trunk/boost/ratio/mpl/numeric_cast.hpp   (contents, props changed)
Added: trunk/boost/ratio/mpl/numeric_cast.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/ratio/mpl/numeric_cast.hpp	2011-01-02 15:50:40 EST (Sun, 02 Jan 2011)
@@ -0,0 +1,30 @@
+//  numeric_cast.hpp
+//
+//  (C) Copyright 2011 Vicente J. Botet Escriba
+//  Use, modification and distribution are subject to 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_RATIO_MPL_NUMERIC_CAST_HPP
+#define BOOST_RATIO_MPL_NUMERIC_CAST_HPP
+
+#include <boost/ratio.hpp>
+#include <boost/mpl/integral_c.hpp>
+#include <boost/mpl/numeric_cast.hpp>
+
+namespace boost { 
+namespace mpl {
+
+template<> struct numeric_cast< integral_c_tag,rational_c_tag >
+{
+    template< typename N > struct apply
+        : ratio< N::value, 1 >
+    {
+    };
+};
+    
+}
+}
+
+#endif  // BOOST_RATIO_MPL_NUMERIC_CAST_HPP