~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/util/convert.h

  • Committer: Monty Taylor
  • Date: 2010-02-05 08:11:15 UTC
  • mfrom: (1283 build)
  • mto: (1273.13.43 fix_is)
  • mto: This revision was merged to the branch mainline in revision 1300.
  • Revision ID: mordred@inaugust.com-20100205081115-dr82nvrwv4lvw7sd
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLED_UTIL_CONVERT_H
22
22
#define DRIZZLED_UTIL_CONVERT_H
23
23
 
24
 
#include <boost/lexical_cast.hpp>
25
24
#include <string>
26
25
#include <iostream>
27
26
#include <sstream>
32
31
template <class T>
33
32
std::string to_string(T t)
34
33
{
35
 
  return boost::lexical_cast<std::string>(t);
 
34
  std::ostringstream o;
 
35
  o << t;
 
36
  return o.str();
36
37
}
37
38
 
38
39
template <class T>
47
48
 
48
49
uint64_t drizzled_string_to_hex(char *to, const char *from,
49
50
                                uint64_t from_size);
50
 
void drizzled_hex_to_string(char *to, const char *from, uint64_t from_size);
51
51
 
52
52
} /* namespace drizzled */
53
53