Changeset 727 for trunk/lib/utility.h


Ignore:
Timestamp:
Dec 11, 2008, 4:02:38 PM (14 years ago)
Author:
Jari Häkkinen
Message:

Changes needed to cleanly compile on g++ 4.3 on SuSE 11 x64.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/utility.h

    r724 r727  
    2727#include <functional>
    2828#include <iosfwd>
     29#include <limits>
    2930#include <sstream>
     31#include <stdexcept>
    3032#include <string>
    31 #include <stdexcept>
    3233#include <utility>
    3334#include <vector>
     
    251252    if (is_equal(s, "inf"))
    252253      return std::numeric_limits<T>::infinity();
    253     if (is_equal(s, "-inf"))
     254    if (is_equal(s, "-inf")) {
    254255      if (std::numeric_limits<T>::is_signed)
    255256        return -std::numeric_limits<T>::infinity();
     
    257258        throw std::runtime_error(std::string("convert(\"")+s+
    258259                                 std::string("\"): type is unsigned") );
     260    }
     261
    259262    std::stringstream ss(s);
    260263    T a;
Note: See TracChangeset for help on using the changeset viewer.