textwolf
0.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
textwolf
traits.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014 Patrick P. Frey
3
*
4
* This Source Code Form is subject to the terms of the Mozilla Public
5
* License, v. 2.0. If a copy of the MPL was not distributed with this
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
*/
8
#ifndef __TEXTWOLF_TRAITS_HPP__
9
#define __TEXTWOLF_TRAITS_HPP__
10
13
namespace
textwolf {
14
namespace
traits {
15
18
class
TypeCheck
19
{
20
public
:
21
struct
YES
{};
22
struct
NO
{};
23
24
template
<
typename
T,
typename
U>
25
struct
is_same
26
{
27
static
const
NO
type
() {
return
NO
();}
28
};
29
30
template
<
typename
T>
31
struct
is_same
<T,T>
32
{
33
static
const
YES
type
() {
return
YES
();}
34
};
35
};
36
37
}}
//namespace
38
#endif
textwolf::traits::TypeCheck
Test structure to stear the compiler.
Definition:
traits.hpp:18
textwolf::traits::TypeCheck::is_same< T, T >::type
static const YES type()
Definition:
traits.hpp:33
textwolf::traits::TypeCheck::is_same::type
static const NO type()
Definition:
traits.hpp:27
textwolf::traits::TypeCheck::NO
Definition:
traits.hpp:22
textwolf::traits::TypeCheck::is_same
Definition:
traits.hpp:25
textwolf::traits::TypeCheck::YES
Definition:
traits.hpp:21
Generated on Sat Apr 22 2017 17:23:53 for textwolf by
1.8.6