From 17ca3a4493efa489dc734e6902fbb547172eac15 Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Sun, 12 Feb 2006 01:17:17 +0000 Subject: [PATCH] show arg as pased by const ref [SVN r32840] --- lexical_cast.htm | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/lexical_cast.htm b/lexical_cast.htm index 0ec5553..949b70c 100644 --- a/lexical_cast.htm +++ b/lexical_cast.htm @@ -4,7 +4,7 @@ lexical_cast - +

boost.png (6897 bytes)Header @@ -89,8 +89,7 @@

Examples

The following example treats command line arguments as a sequence of numeric data:
-
-int main(int argc, char * argv[])
+				
int main(int argc, char * argv[])
 {
     using boost::lexical_cast;
     using boost::bad_lexical_cast;
@@ -112,8 +111,7 @@ int main(int argc, char * argv[])
 }
 
The following example uses numeric data in a string expression:
-
-void log_message(const std::string &);
+				
void log_message(const std::string &);
 
 void log_errno(int yoko)
 {
@@ -125,12 +123,11 @@ void log_errno(int yoko)
 			

Synopsis

Library features defined in "boost/lexical_cast.hpp":
-
-namespace boost
+				
namespace boost
 {
     class bad_lexical_cast;
     template<typename Target, typename Source>
-      Target lexical_cast(Source arg);
+      Target lexical_cast(const Source& arg);
 }
 
Unit test defined in "lexical_cast_test.cpp". @@ -138,9 +135,8 @@ namespace boost

lexical_cast

-
-template<typename Target, typename Source>
-  Target lexical_cast(Source arg);
+				
template<typename Target, typename Source>
+  Target lexical_cast(const Source& arg);
 
Returns the result of streaming arg into a standard library string-based stream and then out as a Target object. @@ -186,8 +182,7 @@ template<typename Target, typename Source>

bad_lexical_cast

-
-class bad_lexical_cast : public std::bad_cast
+				
class bad_lexical_cast : public std::bad_cast
 {
 public:
     ... // same member function interface as std::exception
@@ -236,4 +231,4 @@ public:
 			
 
© Copyright Kevlin Henney, 2000–2005
- + \ No newline at end of file