port/mars-tycoon
Last change
on this file since 25c4774 was 80a6a52, checked in by Jonathan Neufeld <support@…>, 3 years ago |
Get to a compile state for terrain procedural generation
|
-
Property mode
set to
100755
|
File size:
854 bytes
|
Rev | Line | |
---|
[80a6a52] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | namespace mars
|
---|
| 4 | {
|
---|
| 5 | template <bool L, bool R>
|
---|
| 6 | struct andb {};
|
---|
| 7 |
|
---|
| 8 | template <>
|
---|
| 9 | struct andb <true, true> { static const bool value = true; };
|
---|
| 10 |
|
---|
| 11 | /* FIXME: Couldn't ever get this to work right
|
---|
| 12 | template <typename LCond, typename RCond>
|
---|
| 13 | struct and : public andb<LCond::value, RCond::value> {};
|
---|
| 14 | */
|
---|
| 15 |
|
---|
| 16 | template <bool B, typename E = void>
|
---|
| 17 | struct enable_ifb { typedef E Type; };
|
---|
| 18 |
|
---|
| 19 | template <typename E>
|
---|
| 20 | struct enable_ifb <false, E> {};
|
---|
| 21 |
|
---|
| 22 | /* FIXME: Couldn't ever get this to work right
|
---|
| 23 | template <typename J, typename E = void>
|
---|
| 24 | struct enable_if : public enable_ifb<J::value, E> {};
|
---|
| 25 | */
|
---|
| 26 |
|
---|
| 27 | template <typename E>
|
---|
| 28 | struct has_def { static const bool value = sizeof(E *) > 0; };
|
---|
| 29 |
|
---|
| 30 | template<typename T>
|
---|
| 31 | struct identity { typedef T type; };
|
---|
| 32 |
|
---|
| 33 | template<unsigned N>
|
---|
| 34 | struct quantity { unsigned value = N; };
|
---|
| 35 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.