[ Web Proxy ]
URL:
Viewing: https://ru.cppreference.com/cpp/utility/program/at_quick_exit [Back]  [Original]

std::at_quick_exit cppreference.com
cppreference.com

std::at_quick_exit

cppreference.com
 
C++
(C++20)
(C++20)
(C++11)
(C++20)
/
(C++11)
(C++11)
(C++11)
(C++17)
 
 
 
<tbody> </tbody>
int at_quick_exit( /*atexit-*/* func ) noexcept; int at_quick_exit( /*c-atexit-*/* func ) noexcept;
(1) ( C++11)
extern "C++" using /*atexit-*/ = void(); extern "C" using /*c-atexit-*/ = void();
(2) ( *)

func , ( std::quick_exit).

. 32 . .

. , std::atexit.

func , .

0, , .

, func ( )

#include <cstdlib>
#include <iostream>

void f1()
{
    std::cout << " " << std::endl; //  
}

extern "C" void f2()
{
    std::cout << " \n";
}

int main()
{
    auto f3 = []
    {
        std::cout << " \n";
    };

    std::at_quick_exit(f1);
    std::at_quick_exit(f2);
    std::at_quick_exit(f3);
    std::quick_exit(0);
}

:

 
 
 

( )
() []

() []
, std::exit()
() []

() []
C at_quick_exit

Web Proxy Viewer  |  New URL  |  Original Page