blob: f687d91da91154a4b5c6090ac2a52af0965bf208 [file] [log] [blame]
{{/*
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
*/}}
{{- define "NaturalTypeAlias" }}
{{ EnsureNamespace . }}
{{- .Docs }}
using {{ .Name }} = {{ .HLCPP }};
{{- /* Natural types strict bits is a simple enum class, hence the mask is
stored on-the-side in the form of an extra constant. */}}
{{- if Eq .Kind Kinds.Bits }}
{{- if .IsStrict }}
const static {{ .Name }} {{ .MaskName.Name }} = {{ .MaskName.HLCPP }};
{{- end }}
{{- end }}
{{ end }}