{"id":61059,"library":"nonstd-scope-lite","title":"nonstd.scope_lite","description":"C++ standard libraries extensions (version 3) scope_exit, scope_fail, scope_success, unique_resource for C++98 and later in a single-file header-only library","status":"active","version":"0.3.0","language":"cpp","source_language":null,"source_url":null,"tags":["scope","raii","header-only","cpp98"],"install":[{"cmd":"vcpkg install nonstd-scope-lite","lang":"bash","label":"vcpkg"},{"cmd":"# CMakeLists.txt\nfind_package(nonstd_scope_lite CONFIG REQUIRED)\ntarget_link_libraries(main PRIVATE nonstd::scope-lite)","lang":"cmake","label":"CMake"}],"dependencies":[],"imports":[{"symbol":"nonstd/scope.hpp","correct":"#include <nonstd/scope.hpp>"}],"quickstart":{"code":"#include <nonstd/scope.hpp>\n#include <iostream>\n\nint main() {\n    auto guard = nonstd::make_scope_exit([] { std::cout << \"Cleanup\" << std::endl; });\n    std::cout << \"Hello\" << std::endl;\n    return 0;\n}","lang":"cpp","description":"Use scope_exit for automatic cleanup"},"warnings":[{"fix":"Just include the header; no CMake target needed if using header-only mode","message":"Header-only library; no linking required","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'+98':19 '3':8 'c':3,18 'cpp98':36 'exit':10 'extens':6 'fail':12 'file':26 'header':28,34 'header-on':27,33 'later':21 'librari':5,30 'lite':2 'nonstd.scope':1 'raii':32 'resourc':16 'scope':9,11,13,31 'singl':25 'single-fil':24 'standard':4 'success':14 'uniqu':15 'version':7","created_at":"2026-06-17T04:37:18.496353+00:00","updated_at":"2026-06-17T04:37:18.496353+00:00","problems":[],"ecosystem":"vcpkg","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}