Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
smaller.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This file is part of the gobelijn software.
4  * Gobelijn is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation, either version 3 of the License, or any later
7  * version. Gobelijn is distributed in the hope that it will be useful, but
8  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
9  * or FITNESS FOR A PARTICULAR PURPOSE.
10  * See the GNU General Public License for details. You should have received
11  * a copy of the GNU General Public License along with the software. If not,
12  * see <http://www.gnu.org/licenses/>.
13  *
14  * Copyright 2012, Jan Broeckhove.
15  */
21 // BEGIN_SNIPPET{FullSource}
22 #include "select.h"
23 
27 template <typename T1, typename T2>
28 struct smaller
29 {
31 };
32 // END_SNIPPET{FullSource}
typename select< T1, T2,(sizeof(T1)< sizeof(T2))>::type type
Definition: smaller.h:30
Compile-time selection of type with smallest size.
Definition: smaller.h:28
Select one of two types depending on bool switch.
Primary template for selection between two types.
Definition: select.h:25