C++ Library Extensions 2022.12.09
To help learn modern C++ programming
022-noexcept.cpp File Reference
#include <tpf_output.hpp>
Include dependency graph for 022-noexcept.cpp:

Go to the source code of this file.

Classes

struct  dummy_type
 

Functions

int sum (int a, int b) noexcept
 
template<typename T >
pro (T a, T b) noexcept
 
void example_is_noexcept ()
 
int main ()
 

Variables

template<auto FuncType, typename... ArgTypes>
constexpr bool is_noexcept_v = noexcept(FuncType(std::declval<ArgTypes>()...))
 
template<auto FuncPtr, typename... ArgTypes>
constexpr auto func_ptr_t = FuncPtr<ArgTypes...>
 

Function Documentation

◆ example_is_noexcept()

void example_is_noexcept ( )

Definition at line 22 of file 022-noexcept.cpp.

Here is the caller graph for this function:

◆ main()

int main ( )

Definition at line 36 of file 022-noexcept.cpp.

Here is the call graph for this function:

◆ pro()

template<typename T >
T pro ( a,
b 
)
noexcept

Definition at line 14 of file 022-noexcept.cpp.

◆ sum()

int sum ( int  a,
int  b 
)
noexcept

Definition at line 8 of file 022-noexcept.cpp.

Variable Documentation

◆ func_ptr_t

template<auto FuncPtr, typename... ArgTypes>
constexpr auto func_ptr_t = FuncPtr<ArgTypes...>
constexpr

Definition at line 20 of file 022-noexcept.cpp.

◆ is_noexcept_v

template<auto FuncType, typename... ArgTypes>
constexpr bool is_noexcept_v = noexcept(FuncType(std::declval<ArgTypes>()...))
constexpr

Definition at line 6 of file 022-noexcept.cpp.