Skip to content

Commit b16675e

Browse files
happyCoder92copybara-github
authored andcommitted
Fix convenience helper Allow to not SIGSEGV for wrong operands
Now it should just not compile. PiperOrigin-RevId: 970428735 Change-Id: Ic69469e4d01b4d0c55e53b4b6491af501ac169db
1 parent c446692 commit b16675e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sandboxed_api/sandbox2/policybuilder.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ class PolicyBuilder final {
144144
//
145145
// Each `type T` is defined in an individual library and individually
146146
// visibility restricted.
147-
template <typename... T>
148-
PolicyBuilder& Allow(T... tags) {
149-
return (Allow(tags), ...);
147+
template <typename TF, typename... T>
148+
PolicyBuilder& Allow(TF tag, T... tags) {
149+
return Allow(tag), (Allow(tags), ...);
150150
}
151151

152152
// Disables the use of namespaces.

0 commit comments

Comments
 (0)