Commit 85d4bb72 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

mln/convert/from_to.hh: Make use of value::cast for conversions between built-in types.

parent d44aa817
2010-11-15 Guillaume Lazzara <z@lrde.epita.fr>
* mln/convert/from_to.hh: Make use of value::cast for conversions
between built-in types.
2010-11-15 Guillaume Lazzara <z@lrde.epita.fr>
 
* mln/data/paste_without_localization.hh: Add a missing dispatch
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -44,6 +45,7 @@
# include <mln/metal/is.hh>
# include <mln/metal/is_a.hh>
# include <mln/value/cast.hh>
namespace mln
{
......@@ -156,7 +158,12 @@ namespace mln
from_to_dispatch(metal::false_, const F& from,
metal::false_, T& to)
{
over_load::from_to_(from, to);
to = mln::value::cast<T>(from);
// We prefer using value::cast instead of a from_to_ overload.
// We don't want to write explicitly every from_to_ overload
// for all built-in types.
// over_load::from_to_(from, to);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment