Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Macros | Functions | Variables
18.limits.traps.cpp File Reference
#include <limits>
#include <csignal>
#include <rw_any.h>
#include <rw_cmdopt.h>
#include <rw_driver.h>
#include <csetjmp>
Include dependency graph for 18.limits.traps.cpp:

Go to the source code of this file.

Macros

#define RW_SIGSETJMP(env, ignore)   setjmp (env)
 
#define TRY   if (1)
 
#define EXCEPT(ignore)   else if (0)
 
#define TEST(T, floating)   test_traps ((T)0, __LINE__, floating)
 

Functions

void handle_fpe (int)
 
template<class numT >
void try_trap (const volatile numT &one, const volatile numT &zero, numT &result, bool &trapped)
 
template<class numT >
numT test_traps (numT, int lineno, bool)
 
int main (int argc, char *argv[])
 

Variables

std::jmp_buf jmp_env
 

Macro Definition Documentation

◆ EXCEPT

#define EXCEPT (   ignore)    else if (0)

Definition at line 88 of file 18.limits.traps.cpp.

◆ RW_SIGSETJMP

#define RW_SIGSETJMP (   env,
  ignore 
)    setjmp (env)

Definition at line 71 of file 18.limits.traps.cpp.

◆ TEST

#define TEST (   T,
  floating 
)    test_traps ((T)0, __LINE__, floating)

◆ TRY

#define TRY   if (1)

Definition at line 87 of file 18.limits.traps.cpp.

Function Documentation

◆ handle_fpe()

void handle_fpe ( int  )

Definition at line 65 of file 18.limits.traps.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 209 of file 18.limits.traps.cpp.

◆ test_traps()

template<class numT >
numT test_traps ( numT  ,
int  lineno,
bool   
)

Definition at line 108 of file 18.limits.traps.cpp.

◆ try_trap()

template<class numT >
void try_trap ( const volatile numT &  one,
const volatile numT &  zero,
numT &  result,
bool &  trapped 
)
inline

Definition at line 94 of file 18.limits.traps.cpp.

Variable Documentation

◆ jmp_env

std::jmp_buf jmp_env

18.limits_traps.cpp - test exercising std::numeric_limits::traps

$Id$

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2005-2006 Rogue Wave Software.

Definition at line 61 of file 18.limits.traps.cpp.