// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_TYPES_TOKEN_TYPE_H_ #define BASE_TYPES_TOKEN_TYPE_H_ #include <compare> #include <type_traits> #include "base/check.h" #include "base/types/strong_alias.h" #include "base/unguessable_token.h" namespace base { // A specialization of StrongAlias for UnguessableToken. Unlike // UnguessableToken, a TokenType<...> does not default to null and does not // expose the concept of null tokens. If you need to indicate a null token, // please use std::optional<TokenType<...>>. template <typename TypeMarker> class TokenType : public StrongAlias<TypeMarker, UnguessableToken> { … }; } // namespace base #endif // BASE_TYPES_TOKEN_TYPE_H_