Fixed compilation for clang on Linux

dev
Bill 2 years ago
parent 406593a311
commit b2f009532c

@ -22,7 +22,7 @@ AQuery is tested on mainstream operating systems such as Windows, macOS and Linu
### Windows
There're multiple options to run AQuery on Windows. You can use the native toolchain from Microsoft Visual Studio or gcc from Cygwin/MinGW or run it under Windows Subsystem for Linux.
- For WSL, Docker or linux virtual machines, see Linux, Docker sections below
- For WSL, Docker or Linux virtual machines, see Linux, Docker sections below
- For Visual Studio:
1. Install python3.6 or above from [official website](https://www.python.org/downloads/windows/) or Microsoft Store.
2. Install Microsoft Visual Studio 2022 or later with **Desktop development with C++** selected.

@ -622,86 +622,144 @@ inline void TableInfo<Types...>::print(const char* __restrict sep, const char* _
std::cout << end;
}
}
template <class T1,
template<typename ...> class VT,
class TRet>
using test_vt_support = typename std::enable_if_t<std::is_same_v<VT<T1>, ColRef<T1>> ||
std::is_same_v<VT<T1>, ColView<T1>> ||
std::is_same_v<VT<T1>, vector_type<T1>>, TRet>;
template <class T1, class T2,
template<typename ...> class VT>
using get_autoext_type = test_vt_support<T1, VT,
decayed_t<VT, typename types::Coercion<T1, T2>::type>>;
template <class T1, class T2,
template<typename ...> class VT>
using get_long_type = test_vt_support<T1, VT,
decayed_t<VT, types::GetLongType<typename types::Coercion<T1, T2>::type>>>;
template <class T1, class T2,
template<typename ...> class VT>
using get_fp_type = test_vt_support<T1, VT,
decayed_t<VT, types::GetFPType<typename types::Coercion<T1, T2>::type>>>;
template <class T1,
template<typename ...> class VT, template<typename ...> class VT2,
class TRet>
using test_vt_support2 = typename std::enable_if_t<(std::is_same_v<VT<T1>, ColRef<T1>> ||
std::is_same_v<VT<T1>, ColView<T1>> ||
std::is_same_v<VT<T1>, vector_type<T1>>) &&
(std::is_same_v<VT2<T1>, ColRef<T1>> ||
std::is_same_v<VT2<T1>, ColView<T1>> ||
std::is_same_v<VT2<T1>, vector_type<T1>>), TRet >;
template <class T1, class T2,
template<typename ...> class VT, template<typename ...> class VT2>
using get_autoext_type2 = test_vt_support2<T1, VT, VT2,
decayed_t<VT, typename types::Coercion<T1, T2>::type>>;
template <class T1, class T2,
template<typename ...> class VT, template<typename ...> class VT2>
using get_long_type2 = test_vt_support2<T1, VT, VT2,
decayed_t<VT, types::GetLongType<typename types::Coercion<T1, T2>::type>>>;
template <class T1, class T2,
template<typename ...> class VT, template<typename ...> class VT2>
using get_fp_type2 = test_vt_support2<T1, VT, VT2,
decayed_t<VT, types::GetFPType<typename types::Coercion<T1, T2>::type>>>;
template <class T1, class T2, template<typename ...> class VT, template<typename ...> class VT2>
decayed_t<VT, typename types::Coercion<T1, T2>::type> operator -(const VT<T1>& lhs, const VT2<T2>& rhs) {
auto ret = decayed_t<VT, typename types::Coercion<T1, T2>::type>(lhs.size);
get_autoext_type2<T1, T2, VT, VT2>
operator -(const VT<T1>& lhs, const VT2<T2>& rhs) {
auto ret = get_autoext_type2<T1, T2, VT, VT2>(lhs.size);
for (uint32_t i = 0; i < lhs.size; ++i)
ret[i] = lhs[i] - rhs[i];
return ret;
}
template <class T1, class T2, template<typename ...> class VT>
decayed_t<VT, typename types::Coercion<T1, T2>::type> operator -(const VT<T1>& lhs, const T2& rhs) {
auto ret = decayed_t<VT, typename types::Coercion<T1, T2>::type>(lhs.size);
get_autoext_type<T1, T2, VT>
operator -(const VT<T1>& lhs, const T2& rhs) {
auto ret = get_autoext_type<T1, T2, VT>(lhs.size);
for (uint32_t i = 0; i < lhs.size; ++i)
ret[i] = lhs[i] - rhs;
return ret;
}
template <class T1, class T2, template<typename ...> class VT>
decayed_t<VT, typename types::Coercion<T1, T2>::type> operator -(const T2& lhs, const VT<T1>& rhs) {
auto ret = decayed_t<VT, typename types::Coercion<T1, T2>::type>(rhs.size);
get_autoext_type<T1, T2, VT>
operator -(const T2& lhs, const VT<T1>& rhs) {
auto ret = get_autoext_type<T1, T2, VT>(rhs.size);
for (uint32_t i = 0; i < rhs.size; ++i)
ret[i] = lhs - rhs[i];
return ret;
}
template <class T1, class T2, template<typename ...> class VT, template<typename ...> class VT2>
decayed_t<VT, typename types::Coercion<T1, T2>::type> operator +(const VT<T1>& lhs, const VT2<T2>& rhs) {
auto ret = decayed_t<VT, typename types::Coercion<T1, T2>::type>(lhs.size);
get_autoext_type2<T1, T2, VT, VT2>
operator +(const VT<T1>& lhs, const VT2<T2>& rhs) {
auto ret = get_autoext_type2<T1, T2, VT, VT2>(lhs.size);
for (uint32_t i = 0; i < lhs.size; ++i)
ret[i] = lhs[i] + rhs[i];
return ret;
}
template <class T1, class T2, template<typename ...> class VT>
decayed_t<VT, typename types::Coercion<T1, T2>::type> operator +(const VT<T1>& lhs, const T2& rhs) {
auto ret = decayed_t<VT, typename types::Coercion<T1, T2>::type>(lhs.size);
get_autoext_type<T1, T2, VT>
operator +(const VT<T1>& lhs, const T2& rhs) {
auto ret = get_autoext_type<T1, T2, VT>(lhs.size);
for (uint32_t i = 0; i < lhs.size; ++i)
ret[i] = lhs[i] + rhs;
return ret;
}
template <class T1, class T2, template<typename ...> class VT>
decayed_t<VT, typename types::Coercion<T1, T2>::type> operator +(const T2& lhs, const VT<T1>& rhs) {
auto ret = decayed_t<VT, typename types::Coercion<T1, T2>::type>(rhs.size);
get_autoext_type<T1, T2, VT>
operator +(const T2& lhs, const VT<T1>& rhs) {
auto ret = get_autoext_type<T1, T2, VT> (rhs.size);
for (uint32_t i = 0; i < rhs.size; ++i)
ret[i] = lhs + rhs[i];
return ret;
}
template <class T1, class T2, template<typename ...> class VT, template<typename ...> class VT2>
decayed_t<VT, typename types::Coercion<T1, T2>::type> operator *(const VT<T1>& lhs, const VT2<T2>& rhs) {
auto ret = decayed_t<VT, typename types::Coercion<T1, T2>::type>(lhs.size);
get_long_type2<T1, T2, VT, VT2>
operator *(const VT<T1>& lhs, const VT2<T2>& rhs) {
auto ret = get_long_type2<T1, T2, VT, VT2>(lhs.size);
for (uint32_t i = 0; i < lhs.size; ++i)
ret[i] = lhs[i] * rhs[i];
return ret;
}
template <class T1, class T2, template<typename ...> class VT>
decayed_t<VT, typename types::Coercion<T1, T2>::type> operator *(const VT<T1>& lhs, const T2& rhs) {
auto ret = decayed_t<VT, typename types::Coercion<T1, T2>::type>(lhs.size);
get_long_type<T1, T2, VT>
operator *(const VT<T1>& lhs, const T2& rhs) {
auto ret = get_long_type<T1, T2, VT>(lhs.size);
for (uint32_t i = 0; i < lhs.size; ++i)
ret[i] = lhs[i] * rhs;
return ret;
}
template <class T1, class T2, template<typename ...> class VT>
decayed_t<VT, typename types::Coercion<T1, T2>::type> operator *(const T2& lhs, const VT<T1>& rhs) {
auto ret = decayed_t<VT, typename types::Coercion<T1, T2>::type>(rhs.size);
get_long_type<T1, T2, VT>
operator *(const T2& lhs, const VT<T1>& rhs) {
auto ret = get_long_type<T1, T2, VT>(rhs.size);
for (uint32_t i = 0; i < rhs.size; ++i)
ret[i] = lhs * rhs[i];
return ret;
}
template <class T1, class T2, template<typename ...> class VT, template<typename ...> class VT2>
decayed_t<VT, types::GetFPType<typename types::Coercion<T1, T2>::type>> operator /(const VT<T1>& lhs, const VT2<T2>& rhs) {
auto ret = decayed_t<VT, types::GetFPType<typename types::Coercion<T1, T2>::type>>(lhs.size);
get_fp_type2<T1, T2, VT, VT2>
operator /(const VT<T1>& lhs, const VT2<T2>& rhs) {
auto ret = get_fp_type2<T1, T2, VT, VT2>(lhs.size);
for (uint32_t i = 0; i < lhs.size; ++i)
ret[i] = lhs[i] / rhs[i];
return ret;
}
template <class T1, class T2, template<typename ...> class VT>
decayed_t<VT, types::GetFPType<typename types::Coercion<T1, T2>::type>> operator /(const VT<T1>& lhs, const T2& rhs) {
auto ret = decayed_t<VT, types::GetFPType<typename types::Coercion<T1, T2>::type>>(lhs.size);
get_fp_type<T1, T2, VT>
operator /(const VT<T1>& lhs, const T2& rhs) {
auto ret = get_fp_type<T1, T2, VT>(lhs.size);
for (uint32_t i = 0; i < lhs.size; ++i)
ret[i] = lhs[i] / rhs;
return ret;
}
template <class T1, class T2, template<typename ...> class VT>
decayed_t<VT, types::GetFPType<typename types::Coercion<T1, T2>::type>> operator /(const T2& lhs, const VT<T1>& rhs) {
auto ret = decayed_t<VT, types::GetFPType<typename types::Coercion<T1, T2>::type>>(rhs.size);
get_fp_type<T1, T2, VT>
operator /(const T2& lhs, const VT<T1>& rhs) {
auto ret = get_fp_type<T1, T2, VT>(rhs.size);
for (uint32_t i = 0; i < rhs.size; ++i)
ret[i] = lhs / rhs[i];
return ret;

Loading…
Cancel
Save