| 1869 | |
| 1870 | template<class ValueType> |
| 1871 | bool RootCheckIndexSign(ValueType & x, const ValueType & index, ErrorCode * err) |
| 1872 | { |
| 1873 | if( index.IsSign() ) |
| 1874 | { |
| 1875 | // index cannot be negative |
| 1876 | if( err ) |
| 1877 | *err = err_improper_argument; |
| 1878 | |
| 1879 | x.SetNan(); |
| 1880 | |
| 1881 | return true; |
| 1882 | } |
| 1883 | |
| 1884 | return false; |
| 1885 | } |
| 1886 | |
| 1887 | |
| 1888 | template<class ValueType> |