]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/json/null_resource.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / json / null_resource.hpp
1 //
2 // Copyright (c) 2020 Vinnie Falco (vinnie.falco@gmail.com)
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/boostorg/json
8 //
9
10 #ifndef BOOST_JSON_NULL_RESOURCE_HPP
11 #define BOOST_JSON_NULL_RESOURCE_HPP
12
13 #include <boost/json/detail/config.hpp>
14 #include <boost/json/memory_resource.hpp>
15
16 BOOST_JSON_NS_BEGIN
17
18 /** Return a pointer to the null resource.
19
20 This memory resource always throws the exception
21 `std::bad_alloc` in calls to `allocate`.
22
23 @par Complexity
24 Constant.
25
26 @par Exception Safety
27 No-throw guarantee.
28 */
29 BOOST_JSON_DECL
30 memory_resource*
31 get_null_resource() noexcept;
32
33 BOOST_JSON_NS_END
34
35 #endif