summaryrefslogtreecommitdiff
path: root/src/compat
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-15 20:05:17 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-19 20:09:35 -0700
commitceeda2e337077b2edaf1af09cc4df2c30e8205a1 (patch)
treeab7a70020e1dcac9ee56531c1c5af9888989f4f3 /src/compat
parent147c3e9c891c12dbfd39b65ee0f5baddf5f81b14 (diff)
downloadtmwa-ceeda2e337077b2edaf1af09cc4df2c30e8205a1.tar.gz
tmwa-ceeda2e337077b2edaf1af09cc4df2c30e8205a1.tar.bz2
tmwa-ceeda2e337077b2edaf1af09cc4df2c30e8205a1.tar.xz
tmwa-ceeda2e337077b2edaf1af09cc4df2c30e8205a1.zip
Wouldn't it be nice to have some integers too?
Diffstat (limited to 'src/compat')
-rw-r--r--src/compat/alg.hpp4
-rw-r--r--src/compat/iter_test.cpp6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/compat/alg.hpp b/src/compat/alg.hpp
index adf3f3f..f9ed8d2 100644
--- a/src/compat/alg.hpp
+++ b/src/compat/alg.hpp
@@ -21,7 +21,8 @@
# include "../sanity.hpp"
-# include <type_traits>
+# if 0
+# include <type_traits>
template<class A, class B>
@@ -35,5 +36,6 @@ typename std::common_type<A, B>::type max(A a, B b)
{
return b < a ? a : b;
}
+# endif
#endif // TMWA_COMPAT_ALG_HPP
diff --git a/src/compat/iter_test.cpp b/src/compat/iter_test.cpp
index a07cb0f..99b2e68 100644
--- a/src/compat/iter_test.cpp
+++ b/src/compat/iter_test.cpp
@@ -20,6 +20,8 @@
#include <gtest/gtest.h>
+#include "../ints/udl.hpp"
+
#include "../strings/xstring.hpp"
#include "../poison.hpp"
@@ -33,7 +35,7 @@ TEST(iterpair, strings)
TEST(iterpair, signed8)
{
- IteratorPair<ValueIterator<int8_t>> pair = value_range(int8_t(-128), int8_t(127));
+ IteratorPair<ValueIterator<int8_t>> pair = value_range(-128_n8, +127_p8);
int8_t arr[255] =
{
-128, -127, -126, -125, -124, -123, -122, -121, -120,
@@ -68,7 +70,7 @@ TEST(iterpair, signed8)
TEST(iterpair, unsigned8)
{
- IteratorPair<ValueIterator<uint8_t>> pair = value_range(uint8_t(0), uint8_t(255));
+ IteratorPair<ValueIterator<uint8_t>> pair = value_range(0_u8, 255_u8);
uint8_t arr[255] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,