Skip to content

Commit 8f0d494

Browse files
committed
fixed lib path, removed broken tribool usage
1 parent 385baad commit 8f0d494

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

kit/kit.h

+8-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <boost/optional.hpp>
1818
#include <boost/bimap.hpp>
1919
#include <boost/any.hpp>
20-
#include <boost/logic/tribool.hpp>
2120

2221
// extended identifiers in msvc (and,or,not)
2322
#ifdef _MSC_VER
@@ -882,22 +881,22 @@ namespace kit
882881
}
883882

884883
template<class T>
885-
boost::tribool any_eq_type(const boost::any& a, const boost::any& b) {
884+
int any_eq_type(const boost::any& a, const boost::any& b) {
886885
if (a.type() == typeid(T) && b.type() == typeid(T))
887886
return boost::any_cast<T>(a) ==
888887
boost::any_cast<T>(b);
889-
return boost::tribool::indeterminate_value;
888+
return -1;
890889
}
891890

892891
inline bool any_eq(const boost::any& a, const boost::any& b) {
893892
if(a.type() != b.type())
894893
return false;
895-
{auto r = any_eq_type<std::string>(a,b); if(r||!r) return r;}
896-
{auto r = any_eq_type<int>(a,b); if(r||!r) return r;}
897-
{auto r = any_eq_type<unsigned>(a,b); if(r||!r) return r;}
898-
{auto r = any_eq_type<float>(a,b); if(r||!r) return r;}
899-
{auto r = any_eq_type<double>(a,b); if(r||!r) return r;}
900-
{auto r = any_eq_type<bool>(a,b); if(r||!r) return r;}
894+
{auto r = any_eq_type<std::string>(a,b); if(r>=0) return r; }
895+
{auto r = any_eq_type<int>(a,b); if(r>=0) return r;}
896+
{auto r = any_eq_type<unsigned>(a,b); if(r>=0) return r;}
897+
{auto r = any_eq_type<float>(a,b); if(r>=0) return r;}
898+
{auto r = any_eq_type<double>(a,b); if(r>=0) return r;}
899+
{auto r = any_eq_type<bool>(a,b); if(r>=0) return r;}
901900

902901
throw std::runtime_error("unable to compare values");
903902
}

premake5.lua

+1
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,6 @@ workspace("kit")
137137
}
138138

139139
includedirs {
140+
"lib/local_shared_ptr",
140141
}
141142

0 commit comments

Comments
 (0)