ldc/runtime/jit-rt/cpp-so/slice.h

24 lines
615 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//===-- slice.h - jit support -----------------------------------*- C++ -*-===//
//
// LDC the LLVM D compiler
//
// This file is distributed under the Boost Software License. See the LICENSE
// file for details.
//
//===----------------------------------------------------------------------===//
//
// Jit runtime - simple memory slice class.
//
//===----------------------------------------------------------------------===//
#ifndef SLICE_HPP
#define SLICE_HPP
#include <cstddef> //size_t
template <typename T> struct Slice final {
size_t len;
T *data;
};
#endif // SLICE_HPP