Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:14:59

0001 //
0002 // Copyright (c) 2020 Vinnie Falco (vinnie.falco@gmail.com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/json
0008 //
0009 
0010 #ifndef BOOST_JSON_NULL_RESOURCE_HPP
0011 #define BOOST_JSON_NULL_RESOURCE_HPP
0012 
0013 #include <boost/json/detail/config.hpp>
0014 #include <boost/json/memory_resource.hpp>
0015 
0016 namespace boost {
0017 namespace json {
0018 
0019 /** Return a pointer to the null resource.
0020 
0021     This memory resource always throws the exception
0022     `std::bad_alloc` in calls to `allocate`.
0023 
0024     @par Complexity
0025     Constant.
0026 
0027     @par Exception Safety
0028     No-throw guarantee.
0029 */
0030 BOOST_JSON_DECL
0031 memory_resource*
0032 get_null_resource() noexcept;
0033 
0034 } // namespace json
0035 } // namespace boost
0036 
0037 #endif