// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Copyright (C) Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// This file incorporates work covered by the following copyright and permission
// notice:
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
//
//===----------------------------------------------------------------------===//

#ifndef _ONEDPL_MEMORY
#define _ONEDPL_MEMORY

#include "oneapi/dpl/internal/common_config.h"

// ATTENTION!!! Include the header from the C++ standard library before the oneDPL config header to see whether the _PSTL_VERSION macro is defined
#include <memory>
#include "oneapi/dpl/pstl/onedpl_config.h"

#if !_ONEDPL_MEMORY_FORWARD_DECLARED
// If not declared, pull in forward declarations
#    include "oneapi/dpl/pstl/glue_memory_defs.h"
#    define _ONEDPL_MEMORY_FORWARD_DECLARED 1
#endif // !_ONEDPL_MEMORY_FORWARD_DECLARED

#if _ONEDPL_EXECUTION_POLICIES_DEFINED
// If <execution> has already been included, pull in implementations
#    include "oneapi/dpl/pstl/glue_memory_impl.h"
#    include "oneapi/dpl/pstl/glue_memory_ranges_impl.h"
#endif // _ONEDPL_EXECUTION_POLICIES_DEFINED

namespace oneapi
{
namespace dpl
{
using ::std::addressof;
}
} // namespace oneapi

namespace dpl = oneapi::dpl;

namespace std
{
using oneapi::dpl::destroy;
using oneapi::dpl::destroy_n;
using oneapi::dpl::uninitialized_copy;
using oneapi::dpl::uninitialized_copy_n;
using oneapi::dpl::uninitialized_default_construct;
using oneapi::dpl::uninitialized_default_construct_n;
using oneapi::dpl::uninitialized_fill;
using oneapi::dpl::uninitialized_fill_n;
using oneapi::dpl::uninitialized_move;
using oneapi::dpl::uninitialized_move_n;
using oneapi::dpl::uninitialized_value_construct;
using oneapi::dpl::uninitialized_value_construct_n;
} // namespace std

#endif // _ONEDPL_MEMORY
