Ignore:
Timestamp:
Feb 13, 2011, 6:06:44 PM (11 years ago)
Author:
Peter
Message:

closes #656: convert from numeric to string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/utility.h

    r2386 r2426  
    6262                     OutputIterator result);
    6363
     64  /**
     65     \brief convert T to a string
     66
     67     T is supposed to be a numerical type.
     68
     69     \since new in yat 0.8
     70   */
     71  template<typename T>
     72  std::string convert(T input);
    6473
    6574  /**
     
    259268
    260269  // template implementations
     270  template<typename T>
     271  std::string convert(T input)
     272  {
     273    std::ostringstream ss;
     274    ss << input;
     275    return ss.str();
     276  }
     277
     278
    261279  template<typename T>
    262280  T convert(const std::string& s)
Note: See TracChangeset for help on using the changeset viewer.