Author: mordante
Date: Sun May 3 20:04:17 2009
New Revision: 35436
URL: http://svn.gna.org/viewcvs/wesnoth?rev=35436&view=rev
Log:
Small code cleanup.
Modified:
trunk/src/lexical_cast.hpp
Modified: trunk/src/lexical_cast.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/lexical_cast.hpp?rev=35436&r1=35435&r2=35436&view=diff
==============================================================================
--- trunk/src/lexical_cast.hpp (original)
+++ trunk/src/lexical_cast.hpp Sun May 3 20:04:17 2009
@@ -63,13 +63,29 @@
* @namespace implementation
* Contains the implementation details for lexical_cast and shouldn't be used
* directly.
- *//*
+ */
namespace implementation {
template<typename To, typename From>
struct tlexical_cast;
-} // namespace implementation */
+} // namespace implementation
+
+/**
+ * Lexical cast converts one type to another.
+ *
+ * @tparam To The type to convert to.
+ * @tparam From The type to convert from.
+ *
+ * @param value The value to convert.
+ *
+ * @returns The converted value.
+ */
+template<typename To, typename From>
+inline To lexical_cast(From value)
+{
+ return implementation::tlexical_cast<To, From>().operator()(value);
+}
/** Thrown when a lexical_cast fails. */
struct bad_lexical_cast {};
@@ -161,21 +177,5 @@
} // namespace implementation
-/**
- * Lexical cast converts one type to another.
- *
- * @tparam To The type to convert to.
- * @tparam From The type to convert from.
- *
- * @param value The value to convert.
- *
- * @returns The converted value.
- */
-template<typename To, typename From>
-inline To lexical_cast(From value)
-{
- return implementation::tlexical_cast<To, From>().operator()(value);
-}
-
#endif
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits