Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
macros.h File Reference
#include <cstdlib>

Go to the source code of this file.

Macros

#define COMPILE_ASSERT(x, msg)
 
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
 
#define arraysize(array)
 

Functions

template<typename T , size_t N>
char(& ArraySizeHelper (T(&array)[N]))[N]
 
template<typename T , size_t N>
char(& ArraySizeHelper (const T(&array)[N]))[N]
 

Variables

const bool DEBUG_MODE = true
 

Macro Definition Documentation

◆ arraysize

#define arraysize ( array)
Value:
(sizeof(ArraySizeHelper(array)))
char(& ArraySizeHelper(T(&array)[N]))[N]

Definition at line 39 of file macros.h.

◆ COMPILE_ASSERT

#define COMPILE_ASSERT ( x,
msg )

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 19 of file macros.h.

◆ DISALLOW_COPY_AND_ASSIGN

#define DISALLOW_COPY_AND_ASSIGN ( TypeName)
Value:
TypeName(const TypeName&) = delete; \
TypeName& operator=(const TypeName&) = delete

DISALLOW_COPY_AND_ASSIGN disallows the copy and operator= functions. It goes in the private: declarations in a class.

Definition at line 29 of file macros.h.

Function Documentation

◆ ArraySizeHelper() [1/2]

template<typename T , size_t N>
char(& ArraySizeHelper ( const T(&) array[N]) )[N]

◆ ArraySizeHelper() [2/2]

template<typename T , size_t N>
char(& ArraySizeHelper ( T(&) array[N]) )[N]

Variable Documentation

◆ DEBUG_MODE

const bool DEBUG_MODE = true

Definition at line 24 of file macros.h.