mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 16:50:48 +00:00
Compatibility with clang [#CONV-2807].
This commit is contained in:
parent
3e50a4f63b
commit
c3e3b66dc4
@ -1,5 +1,4 @@
|
||||
#ifndef MYSQLXX_ROW_H
|
||||
#define MYSQLXX_ROW_H
|
||||
#pragma once
|
||||
|
||||
#include <mysqlxx/Types.h>
|
||||
#include <mysqlxx/String.h>
|
||||
@ -22,14 +21,6 @@ class ResultBase;
|
||||
*/
|
||||
class Row
|
||||
{
|
||||
private:
|
||||
/** @brief Pointer to bool data member, for use by safe bool conversion operator.
|
||||
* @see http://www.artima.com/cppsource/safebool.html
|
||||
* Взято из mysql++.
|
||||
*/
|
||||
typedef MYSQL_ROW Row::*private_bool_type;
|
||||
void this_type_does_not_support_comparisons() const {}
|
||||
|
||||
public:
|
||||
/** Для возможности отложенной инициализации. */
|
||||
Row() : row(NULL), res(NULL)
|
||||
@ -92,22 +83,5 @@ private:
|
||||
};
|
||||
|
||||
|
||||
/** Следующие две функции генерируют ошибку компиляции при попытке использовать операторы == или !=.
|
||||
*/
|
||||
template <typename T>
|
||||
bool operator!=(const Row & lhs, const T & rhs)
|
||||
{
|
||||
lhs.this_type_does_not_support_comparisons();
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool operator==(const Row & lhs, const T & rhs)
|
||||
{
|
||||
lhs.this_type_does_not_support_comparisons();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -184,6 +184,8 @@ private:
|
||||
}
|
||||
else
|
||||
throwException("Cannot parse Date");
|
||||
|
||||
return 0; /// чтобы не было warning-а.
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user