Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
7 роки тому
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Scope Guard
  2. [![Build Status](https://travis-ci.org/offa/scope-guard.svg?branch=master)](https://travis-ci.org/offa/scope-guard)
  3. [![GitHub release](https://img.shields.io/github/release/offa/scope-guard.svg)](https://github.com/offa/scope-guard/releases)
  4. [![License](https://img.shields.io/badge/license-GPLv3-yellow.svg)](LICENSE)
  5. ![C++](https://img.shields.io/badge/c++-14-green.svg)
  6. Implementation of `scope_guard` and `unique_resource` as proposed in [**P0052R5**][2] (former [N3949][1]).
  7. ## Compatibility
  8. This implementation conforms to [P0052][2], except:
  9. ###### Namespace
  10. The namespace `sr` is used instead of `std`.
  11. ###### Filenames
  12. The filenames contain a `.h` extension.
  13. These deviations are necessary through standard requirements.
  14. ###### std::uncaught_exceptions()
  15. The function `std::uncaught_exceptions()` is not available in C++14 and is therefore replaced with `std::uncaught_exception()`. This has some limitations, but is the only solution until C++17 is used.
  16. ## Implementation decisions
  17. ###### Factory functions
  18. The Factory functions for both types are kept for the C++14 implementations as *deduction guides* aren't available.
  19. ## Documentation
  20. - [*P0052R5 - Generic Scope Guard and RAII Wrapper for the Standard Library*][2] (P. Sommerlad, A. L. Sandoval, E. Niebler, D. Krügler)
  21. - [*N3949 - Scoped Resource - Generic RAII Wrapper for the Standard Library*][1] (P. Sommerlad, A. L. Sandoval)
  22. ## License
  23. **GNU General Public License (GPL)**
  24. This program is free software: you can redistribute it and/or modify
  25. it under the terms of the GNU General Public License as published by
  26. the Free Software Foundation, either version 3 of the License, or
  27. (at your option) any later version.
  28. This program is distributed in the hope that it will be useful,
  29. but WITHOUT ANY WARRANTY; without even the implied warranty of
  30. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  31. GNU General Public License for more details.
  32. You should have received a copy of the GNU General Public License
  33. along with this program. If not, see <http://www.gnu.org/licenses/>.
  34. [1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3949.pdf
  35. [2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0052r5.pdf