In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:405:6: error: expected ';' after class definition
}
^
;
/in/kdtree.hpp:408:5: error: 'Node' does not name a type
Node *eraseDynamic(Node *node, size_t dim) {
^~~~
/in/kdtree.hpp:418:5: error: 'Node' does not name a type
Node *BuildTree(Node *node)
^~~~
/in/kdtree.hpp:434:21: error: variable or field 'DeleteTree' declared void
void DeleteTree(Node *node)
^~~~
/in/kdtree.hpp:434:21: error: 'Node' was not declared in this scope
/in/kdtree.hpp:434:27: error: 'node' was not declared in this scope
void DeleteTree(Node *node)
^~~~
/in/kdtree.hpp:445:39: error: 'Key' was not declared in this scope
static bool comparePair(std::pair<Key, Value> a, std::pair<Key, Value> b)
^~~
/in/kdtree.hpp:445:44: error: 'Value' was not declared in this scope
static bool comparePair(std::pair<Key, Value> a, std::pair<Key, Value> b)
^~~~~
/in/kdtree.hpp:445:49: error: template argument 1 is invalid
static bool comparePair(std::pair<Key, Value> a, std::pair<Key, Value> b)
^
/in/kdtree.hpp:445:49: error: template argument 2 is invalid
/in/kdtree.hpp:445:64: error: 'Key' was not declared in this scope
static bool comparePair(std::pair<Key, Value> a, std::pair<Key, Value> b)
^~~
/in/kdtree.hpp:445:69: error: 'Value' was not declared in this scope
static bool comparePair(std::pair<Key, Value> a, std::pair<Key, Value> b)
^~~~~
/in/kdtree.hpp:445:74: error: template argument 1 is invalid
static bool comparePair(std::pair<Key, Value> a, std::pair<Key, Value> b)
^
/in/kdtree.hpp:445:74: error: template argument 2 is invalid
/in/kdtree.hpp: In function 'bool comparePair(int, int)':
/in/kdtree.hpp:447:46: error: request for member 'first' in 'a', which is of non-class type 'int'
return std::less<>{}(std::get<DIM>(a.first), std::get<DIM>(b.first));
^~~~~
/in/kdtree.hpp:447:70: error: request for member 'first' in 'b', which is of non-class type 'int'
return std::less<>{}(std::get<DIM>(a.first), std::get<DIM>(b.first));
^~~~~
/in/kdtree.hpp: At global scope:
/in/kdtree.hpp:451:5: error: 'Node' does not name a type
Node *BuildTreeByVector(std::vector<std::pair<Key, Value>> v, Node *parent, int begin, int end){
^~~~
/in/kdtree.hpp:463:51: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^~~
/in/kdtree.hpp:463:61: error: wrong number of template arguments (1, should be 2)
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^
In file included from /usr/include/c++/7/utility:70:0,
from /usr/include/c++/7/tuple:38,
from /in/kdtree.hpp:1,
from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_pair.h:208:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
struct pair
^~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:463:51: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^~~
/in/kdtree.hpp:463:61: error: wrong number of template arguments (1, should be 2)
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^
In file included from /usr/include/c++/7/utility:70:0,
from /usr/include/c++/7/tuple:38,
from /in/kdtree.hpp:1,
from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_pair.h:208:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
struct pair
^~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:463:51: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^~~
/in/kdtree.hpp:463:61: error: wrong number of template arguments (1, should be 2)
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^
In file included from /usr/include/c++/7/utility:70:0,
from /usr/include/c++/7/tuple:38,
from /in/kdtree.hpp:1,
from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_pair.h:208:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
struct pair
^~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:463:51: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^~~
/in/kdtree.hpp:463:61: error: wrong number of template arguments (1, should be 2)
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^
In file included from /usr/include/c++/7/utility:70:0,
from /usr/include/c++/7/tuple:38,
from /in/kdtree.hpp:1,
from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_pair.h:208:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
struct pair
^~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:463:35: error: invalid template-id
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^~~
/in/kdtree.hpp:463:51: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^~~
/in/kdtree.hpp:463:63: error: missing template arguments before 'a'
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^
/in/kdtree.hpp:463:82: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^~~
/in/kdtree.hpp:463:92: error: wrong number of template arguments (1, should be 2)
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^
In file included from /usr/include/c++/7/utility:70:0,
from /usr/include/c++/7/tuple:38,
from /in/kdtree.hpp:1,
from /in/driver/main.cpp:8:
/usr/include/c++/7/bits/stl_pair.h:208:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
struct pair
^~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:463:95: error: expression list treated as compound expression in initializer [-fpermissive]
static bool ComparePair_equal(std::pair<const Key, Value> a, std::pair<const Key, Value> b)
^
/in/kdtree.hpp:468:1: error: expected unqualified-id before 'public'
public:
^~~~~~
/in/kdtree.hpp:475:43: error: 'Key' was not declared in this scope
explicit KDTree(std::vector<std::pair<Key, Value>> v) {
^~~
/in/kdtree.hpp:475:48: error: 'Value' was not declared in this scope
explicit KDTree(std::vector<std::pair<Key, Value>> v) {
^~~~~
/in/kdtree.hpp:475:48: error: template argument 1 is invalid
/in/kdtree.hpp:475:48: error: template argument 2 is invalid
/in/kdtree.hpp:475:53: error: template argument 1 is invalid
explicit KDTree(std::vector<std::pair<Key, Value>> v) {
^~
/in/kdtree.hpp:475:53: error: template argument 2 is invalid
/in/kdtree.hpp:475:14: error: deduction guide for 'KDTree< <template-parameter-1-1> >' must have trailing return type
explicit KDTree(std::vector<std::pair<Key, Value>> v) {
^~~~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:13:7: note: 'template<class ...> class KDTree' declared here
class KDTree;
^~~~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:475:14: error: deduction guide 'KDTree(int)-> KDTree' must not have a function body
explicit KDTree(std::vector<std::pair<Key, Value>> v) {
^~~~~~
/in/kdtree.hpp: In function 'KDTree(int)-> KDTree':
/in/kdtree.hpp:476:28: error: request for member 'begin' in 'v', which is of non-class type 'int'
std::stable_sort(v.begin(), v.end(), comparePair<0>);
^~~~~
/in/kdtree.hpp:476:39: error: request for member 'end' in 'v', which is of non-class type 'int'
std::stable_sort(v.begin(), v.end(), comparePair<0>);
^~~
/in/kdtree.hpp:477:33: error: request for member 'rbegin' in 'v', which is of non-class type 'int'
auto it = std::unique(v.rbegin(), v.rend(), ComparePair_equal);
^~~~~~
/in/kdtree.hpp:477:45: error: request for member 'rend' in 'v', which is of non-class type 'int'
auto it = std::unique(v.rbegin(), v.rend(), ComparePair_equal);
^~~~
/in/kdtree.hpp:478:31: error: 'Key' was not declared in this scope
std::vector<std::pair<Key, Value>> newv(it.base(), v.end());
^~~
/in/kdtree.hpp:478:36: error: 'Value' was not declared in this scope
std::vector<std::pair<Key, Value>> newv(it.base(), v.end());
^~~~~
/in/kdtree.hpp:478:36: error: template argument 1 is invalid
/in/kdtree.hpp:478:36: error: template argument 2 is invalid
/in/kdtree.hpp:478:41: error: template argument 1 is invalid
std::vector<std::pair<Key, Value>> newv(it.base(), v.end());
^~
/in/kdtree.hpp:478:41: error: template argument 2 is invalid
/in/kdtree.hpp:478:62: error: request for member 'end' in 'v', which is of non-class type 'int'
std::vector<std::pair<Key, Value>> newv(it.base(), v.end());
^~~
/in/kdtree.hpp:478:67: error: expression list treated as compound expression in initializer [-fpermissive]
std::vector<std::pair<Key, Value>> newv(it.base(), v.end());
^
/in/kdtree.hpp:479:9: error: 'root' was not declared in this scope
root = BuildTreeByVector<0>(newv, nullptr, 0, (int)(newv.size()-1));
^~~~
/in/kdtree.hpp:479:9: note: suggested alternative: 'bool'
root = BuildTreeByVector<0>(newv, nullptr, 0, (int)(newv.size()-1));
^~~~
bool
/in/kdtree.hpp:479:16: error: 'BuildTreeByVector' was not declared in this scope
root = BuildTreeByVector<0>(newv, nullptr, 0, (int)(newv.size()-1));
^~~~~~~~~~~~~~~~~
/in/kdtree.hpp:479:43: error: left operand of comma operator has no effect [-Werror=unused-value]
root = BuildTreeByVector<0>(newv, nullptr, 0, (int)(newv.size()-1));
^~~~~~~
/in/kdtree.hpp:479:52: error: right operand of comma operator has no effect [-Werror=unused-value]
root = BuildTreeByVector<0>(newv, nullptr, 0, (int)(newv.size()-1));
^
/in/kdtree.hpp:479:66: error: request for member 'size' in 'newv', which is of non-class type 'int'
root = BuildTreeByVector<0>(newv, nullptr, 0, (int)(newv.size()-1));
^~~~
/in/kdtree.hpp:480:9: error: 'treeSize' was not declared in this scope
treeSize = newv.size();
^~~~~~~~
/in/kdtree.hpp:480:25: error: request for member 'size' in 'newv', which is of non-class type 'int'
treeSize = newv.size();
^~~~
/in/kdtree.hpp: At global scope:
/in/kdtree.hpp:486:12: error: template placeholder type 'const KDTree' must be followed by a simple declarator-id
KDTree(const KDTree &that) {
^~~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:13:7: note: 'template<class ...> class KDTree' declared here
class KDTree;
^~~~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:486:26: error: 'auto' parameter not permitted in this context
KDTree(const KDTree &that) {
^~~~
/in/kdtree.hpp:486:5: error: deduction guide for 'KDTree< <template-parameter-1-1> >' must have trailing return type
KDTree(const KDTree &that) {
^~~~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:13:7: note: 'template<class ...> class KDTree' declared here
class KDTree;
^~~~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:486:5: error: deduction guide 'KDTree()-> KDTree' must not have a function body
KDTree(const KDTree &that) {
^~~~~~
/in/kdtree.hpp: In function 'KDTree()-> KDTree':
/in/kdtree.hpp:488:9: error: invalid use of 'this' in non-member function
this->root = BuildTree(that.root);
^~~~
/in/kdtree.hpp:488:32: error: 'that' was not declared in this scope
this->root = BuildTree(that.root);
^~~~
/in/kdtree.hpp:488:32: note: suggested alternative: 'char'
this->root = BuildTree(that.root);
^~~~
char
/in/kdtree.hpp:488:22: error: 'BuildTree' was not declared in this scope
this->root = BuildTree(that.root);
^~~~~~~~~
/in/kdtree.hpp:489:9: error: 'treeSize' was not declared in this scope
treeSize = that.treeSize;
^~~~~~~~
/in/kdtree.hpp: At global scope:
/in/kdtree.hpp:495:23: error: template placeholder type 'const KDTree' must be followed by a simple declarator-id
KDTree &operator=(const KDTree &that) {
^~~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:13:7: note: 'template<class ...> class KDTree' declared here
class KDTree;
^~~~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:495:37: error: 'auto' parameter not permitted in this context
KDTree &operator=(const KDTree &that) {
^~~~
/in/kdtree.hpp:495:13: error: deduced class type 'KDTree&' in function return type
KDTree &operator=(const KDTree &that) {
^~~~~~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:13:7: note: 'template<class ...> class KDTree' declared here
class KDTree;
^~~~~~
In file included from /in/driver/main.cpp:8:0:
/in/kdtree.hpp:495:41: error: 'KDTree& operator=()' must be a nonstatic member function
KDTree &operator=(const KDTree &that) {
^
/in/kdtree.hpp:506:12: error: expected class-name before '(' token
~KDTree() {
^
/in/kdtree.hpp:513:5: error: 'Iterator' does not name a type; did you mean 'perror'?
Iterator begin() {
^~~~~~~~
perror
/in/kdtree.hpp:520:5: error: 'Iterator' does not name a type; did you mean 'perror'?
Iterator end() {
^~~~~~~~
perror
/in/kdtree.hpp:524:5: error: 'Iterator' does not name a type; did you mean 'perror'?
Iterator find(const Key &key) {
^~~~~~~~
perror
/in/kdtree.hpp:528:23: error: 'Key' does not name a type
void insert(const Key &key, const Value &value) {
^~~
/in/kdtree.hpp:528:39: error: 'Value' does not name a type
void insert(const Key &key, const Value &value) {
^~~~~
/in/kdtree.hpp: In function 'void insert(const int&, const int&)':
/in/kdtree.hpp:529:16: error: ordered comparison of pointer with integer zero [-Werror=extra]
insert<0>(key, value, root, nullptr);
^
/in/kdtree.hpp:529:19: error: left operand of comma operator has no effect [-Werror=unused-value]
insert<0>(key, value, root, nullptr);
^~~
/in/kdtree.hpp:529:31: error: 'root' was not declared in this scope
insert<0>(key, value, root, nullptr);
^~~~
/in/kdtree.hpp:529:31: note: suggested alternative: 'bool'
insert<0>(key, value, root, nullptr);
^~~~
bool
/in/kdtree.hpp: At global scope:
/in/kdtree.hpp:533:5: error: 'Iterator' does not name a type; did you mean 'perror'?
Iterator findMin() {
^~~~~~~~
perror
/in/kdtree.hpp:537:5: error: 'Iterator' does not name a type; did you mean 'perror'?
Iterator findMin(size_t dim) {
^~~~~~~~
perror
/in/kdtree.hpp:543:5: error: 'Iterator' does not name a type; did you mean 'perror'?
Iterator findMax() {
^~~~~~~~
perror
/in/kdtree.hpp:547:5: error: 'Iterator' does not name a type; did you mean 'perror'?
Iterator findMax(size_t dim) {
^~~~~~~~
perror
/in/kdtree.hpp:551:22: error: 'Key' does not name a type
bool erase(const Key &key) {
^~~
/in/kdtree.hpp: In function 'bool erase(const int&)':
/in/kdtree.hpp:552:25: error: 'treeSize' was not declared in this scope
auto prevSize = treeSize;
^~~~~~~~
/in/kdtree.hpp:552:25: note: suggested alternative: 'prevSize'
auto prevSize = treeSize;
^~~~~~~~
prevSize
/in/kdtree.hpp:553:15: error: ordered comparison of pointer with integer zero [-Werror=extra]
erase<0>(root, key);
^
/in/kdtree.hpp:553:18: error: 'root' was not declared in this scope
erase<0>(root, key);
^~~~
/in/kdtree.hpp:553:18: note: suggested alternative: 'bool'
erase<0>(root, key);
^~~~
bool
/in/kdtree.hpp: At global scope:
/in/kdtree.hpp:557:5: error: 'Iterator' does not name a type; did you mean 'perror'?
Iterator erase(Iterator it) {
^~~~~~~~
perror
/in/kdtree.hpp:573:19: error: non-member function 'size_t size()' cannot have cv-qualifier
size_t size() const { return treeSize; }
^~~~~
/in/kdtree.hpp: In function 'size_t size()':
/in/kdtree.hpp:573:34: error: 'treeSize' was not declared in this scope
size_t size() const { return treeSize; }
^~~~~~~~
/in/kdtree.hpp: At global scope:
/in/kdtree.hpp:574:1: error: expected declaration before '}' token
};
^
cc1plus: all warnings being treated as errors