Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
maybe-compare.hpp
Go to the documentation of this file.
1/*
2 MAYBE-COMPARE.hpp - guarded invocation of comparisons
3
4 Copyright (C)
5 2009, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12*/
13
14
20#ifndef LIB_META_MAYBE_COMPARE_H
21#define LIB_META_MAYBE_COMPARE_H
22
23
24
25
26namespace lib {
27namespace meta{
28
29
34 template<typename X>
36 {
37 static bool
38 equals (X const& x1, X const& x2)
39 {
40 return x1 == x2;
41 }
42 };
43
44 /* == add specialisations here == */
45
46
47 template<typename X>
48 inline bool
49 equals_safeInvoke (X const& x1, X const& x2)
50 {
52 }
53
54
55}} // namespace lib::meta
56#endif
enable_if_c< Cond::value, T >::type enable_if
SFINAE helper to control the visibility of specialisations and overloads.
Definition meta/util.hpp:87
bool equals_safeInvoke(X const &x1, X const &x2)
Implementation namespace for support and library code.
Trait template for invoking equality comparison.
static bool equals(X const &x1, X const &x2)