blob: 375aff8dd0b9602ba9b731ea2c409f835c73cee9 [file] [log] [blame]
Jamie Madill5704d6e2014-08-26 13:16:38 -04001//
2// Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7#ifndef UTIL_SHARED_UTILS_H
8#define UTIL_SHARED_UTILS_H
9
10#define SHADER_SOURCE(...) #__VA_ARGS__
11
12// A macro to disallow the copy constructor and operator= functions
13// This must be used in the private: declarations for a class
14#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
15 TypeName(const TypeName&); \
16 void operator=(const TypeName&)
17
Jamie Madill33ea2f92014-08-29 15:15:01 -040018template <typename T, size_t N>
19inline size_t ArraySize(T(&)[N])
20{
21 return N;
22}
23
Jamie Madill5704d6e2014-08-26 13:16:38 -040024#endif // UTIL_SHARED_UTILS_H