1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 310 unchanged lines hidden (view full) --- 319 return true; 320} 321 322#define STN(type) \ 323template<> \ 324bool to_number<type>(const string &value, type &retval) \ 325{ return __to_number(value, retval); } 326 |
327STN(unsigned long long) 328STN(signed long long) 329STN(unsigned long) 330STN(signed long) 331STN(unsigned int) 332STN(signed int) 333STN(unsigned short) 334STN(signed short) 335STN(unsigned char) 336STN(signed char) 337STN(char) |
338 339template<> 340bool to_number<bool>(const string &value, bool &retval) 341{ 342 string lowered = to_lower(value); 343 344 if (value == "0") { 345 retval = false; --- 30 unchanged lines hidden --- |