From 1fe2e899493dc30b7b6f9824aa01c7a412ea5e9b Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Fri, 2 Dec 2016 14:47:54 +0100 Subject: [PATCH] Add comment about error-checking to docu of string_to --- src/stringfunc.hxx | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/stringfunc.hxx b/src/stringfunc.hxx index 13ef703..67c38e7 100644 --- a/src/stringfunc.hxx +++ b/src/stringfunc.hxx @@ -151,6 +151,11 @@ std::string convert_hex_to_binary(const std::string& str) throw(std::runtime_err /** * convert a datatype @a T to a string via string stream. * + * This will not report trouble in conversion; for example: + * string_to("christian") + * will return 0 and not throw an error. + * Use boost::lexical_cast(string) to get error-checked results. + * * @param s the string which should be converted to @a T. * @return the value of type T. */ -- 1.7.1