1 #ifndef SIMDJSON_INTERNAL_ATOMIC_PTR_H
2 #define SIMDJSON_INTERNAL_ATOMIC_PTR_H
4 #include "simdjson/base.h"
13 atomic_ptr(T *_ptr) : ptr{_ptr} {}
15 operator const T*()
const {
return ptr.load(); }
16 const T& operator*()
const {
return *ptr; }
17 const T* operator->()
const {
return ptr.load(); }
19 operator T*() {
return ptr.load(); }
20 T& operator*() {
return *ptr; }
21 T* operator->() {
return ptr.load(); }
22 atomic_ptr& operator=(T *_ptr) { ptr = _ptr;
return *
this; }
The top level simdjson namespace, containing everything the library provides.