This exception is thrown when the to template is unable to perform a conversion at run-time. This typically occurs when the source value cannot be represented in the destination type. This exception is also thrown when the conversion would cause an over- or underflow.
Attempts to perform a value-preserving conversion of the given value from type S to type D. If the conversion cannot be performed in any context, a compile-time error will be issued describing the types involved. If the conversion fails at run-time because the destination type could not represent the value being converted, a ConversionException will be thrown.
Inspired in part by Andrei Alexandrescu's work on std.conv.
Tango Dual License: 3-Clause BSD License / Academic Free License v3.0. See LICENSE_TANGO.txt for details.
Copyright © 2007 Daniel Keep. Some parts copyright (c) 2009-2016 dunnhumby Germany GmbH. All rights reserved.
This module provides a templated function that performs value-preserving conversions between arbitrary types. This function's behaviour can be extended for user-defined types as needed.