• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2024 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CORE_FXCRT_RAW_SPAN_H_
6 #define CORE_FXCRT_RAW_SPAN_H_
7 
8 #include "core/fxcrt/compiler_specific.h"
9 #include "core/fxcrt/span.h"
10 
11 #if defined(PDF_USE_PARTITION_ALLOC)
12 #include "partition_alloc/pointers/raw_ptr.h"
13 #else
14 #include "core/fxcrt/unowned_ptr_exclusion.h"
15 #endif
16 
17 namespace pdfium {
18 
19 #if defined(PDF_USE_PARTITION_ALLOC)
20 template <typename T>
21 using raw_span = span<T, dynamic_extent, raw_ptr<T, AllowPtrArithmetic>>;
22 #else
23 template <typename T>
24 using raw_span = span<T, dynamic_extent, UNOWNED_PTR_EXCLUSION T*>;
25 #endif
26 
27 }  // namespace pdfium
28 
29 #endif  // CORE_FXCRT_RAW_SPAN_H_
30