Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: ‘out_of_range’ is not a member of ‘std’ #4

Open
insanemal opened this issue Aug 31, 2020 · 2 comments
Open

error: ‘out_of_range’ is not a member of ‘std’ #4

insanemal opened this issue Aug 31, 2020 · 2 comments

Comments

@insanemal
Copy link

I'm possibly using far newer versions of things than intended.

And I'm building on Arch Linux

I just want a GC PSO server for me and my kids lol

In file included from ConsistentHashRing.cc:14: Strings.hh: In member function ‘T StringReader::get(bool)’: Strings.hh:126:18: error: ‘out_of_range’ is not a member of ‘std’ 126 | throw std::out_of_range("end of string"); | ^~~~~~~~~~~~ ConsistentHashRing.cc: In constructor ‘ConstantTimeConsistentHashRing::ConstantTimeConsistentHashRing(const std::vector<ConsistentHashRing::Host>&, uint8_t)’: ConsistentHashRing.cc:109:11: error: ‘runtime_error’ was not declared in this scope 109 | throw runtime_error("too many hosts"); | ^~~~~~~~~~~~~ make: *** [<builtin>: ConsistentHashRing.o] Error 1

If it's easier for me to use a different distro than get this going under arch, just let me know which distro and I'll run that up in a VM

@fuzziqersoftware
Copy link
Owner

Sorry for the delay - I don't have Arch Linux set up, so I can't easily work on this. It builds under Ubuntu 18.04 with GCC 7.5.0, and probably any other recent Ubuntu variant.

There must be some implicit header dependencies that I haven't worked out yet. I've just now fixed the one that's causing this issue, but there may be more. Could you pull and try building again?

@insanemal
Copy link
Author

insanemal commented Sep 7, 2020

All good. I built an Ubuntu 18.04 VM and it compiled and runs well.

That has made it progress further on Arch, it now blows up on a bunch of other stuff now

KDTree.hh:55:61: error: ‘ssize_t’ was not declared in this scope; did you mean ‘size_t’?
   55 |       std::input_iterator_tag, std::pair<Point, ValueType>, ssize_t,
      |                                                             ^~~~~~~
      |                                                             size_t
KDTree.hh:56:71: error: template argument 3 is invalid
   56 |       const std::pair<Point, ValueType>*, std::pair<Point, ValueType>&> {
      |                                                                       ^
g++ -fPIC -std=c++14 -g -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -Wall -Werror -DLINUX   -c -o StringsTest.o StringsTest.cc
In file included from KDTree.hh:113,
                 from KDTreeTest.cc:1:
KDTree-inl.hh: In static member function ‘static KDTree<CoordType, dimensions, ValueType>::Point KDTree<CoordType, dimensions, ValueType>::make_point(CoordType)’:
KDTree-inl.hh:34:16: error: ‘logic_error’ is not a member of ‘std’
   34 |     throw std::logic_error("inorrect dimensional point constructor called");
      |                ^~~~~~~~~~~
KDTree-inl.hh: In static member function ‘static KDTree<CoordType, dimensions, ValueType>::Point KDTree<CoordType, dimensions, ValueType>::make_point(CoordType, CoordType)’:
KDTree-inl.hh:45:16: error: ‘logic_error’ is not a member of ‘std’
   45 |     throw std::logic_error("inorrect dimensional point constructor called");
      |                ^~~~~~~~~~~
KDTree-inl.hh: In static member function ‘static KDTree<CoordType, dimensions, ValueType>::Point KDTree<CoordType, dimensions, ValueType>::make_point(CoordType, CoordType, CoordType)’:
KDTree-inl.hh:58:16: error: ‘logic_error’ is not a member of ‘std’
   58 |     throw std::logic_error("inorrect dimensional point constructor called");
      |                ^~~~~~~~~~~
KDTree-inl.hh: In static member function ‘static KDTree<CoordType, dimensions, ValueType>::Point KDTree<CoordType, dimensions, ValueType>::make_point(CoordType, CoordType, CoordType, CoordType)’:
KDTree-inl.hh:72:16: error: ‘logic_error’ is not a member of ‘std’
   72 |     throw std::logic_error("inorrect dimensional point constructor called");
      |                ^~~~~~~~~~~
KDTree-inl.hh: In member function ‘const ValueType& KDTree<CoordType, dimensions, ValueType>::at(const KDTree<CoordType, dimensions, ValueType>::Point&) const’:
KDTree-inl.hh:205:14: error: ‘out_of_range’ is not a member of ‘std’
  205 |   throw std::out_of_range("no such item");
      |              ^~~~~~~~~~~~
KDTree-inl.hh: In member function ‘bool KDTree<CoordType, dimensions, ValueType>::exists(const KDTree<CoordType, dimensions, ValueType>::Point&) const’:
KDTree-inl.hh:213:35: error: expected unqualified-id before ‘&’ token
  213 |   } catch (const std::out_of_range&) {
      |                                   ^
KDTree-inl.hh:213:35: error: expected ‘)’ before ‘&’ token
  213 |   } catch (const std::out_of_range&) {
      |           ~                       ^
      |                                   )
KDTree-inl.hh:213:35: error: expected ‘{’ before ‘&’ token
KDTree-inl.hh:213:36: error: expected primary-expression before ‘)’ token
  213 |   } catch (const std::out_of_range&) {
      |                                    ^
KDTree-inl.hh: In member function ‘std::vector<std::pair<KDTree<CoordType, dimensions, ValueType>::Point, ValueType> > KDTree<CoordType, dimensions, ValueType>::within(const KDTree<CoordType, dimensions, ValueType>::Point&, const KDTree<CoordType, dimensions, ValueType>::Point&) const’:
KDTree-inl.hh:223:16: error: ‘out_of_range’ is not a member of ‘std’
  223 |     throw std::out_of_range("no such item");
      |                ^~~~~~~~~~~~
KDTree-inl.hh: In member function ‘bool KDTree<CoordType, dimensions, ValueType>::delete_node(KDTree<CoordType, dimensions, ValueType>::Node*)’:
KDTree-inl.hh:385:18: error: ‘logic_error’ is not a member of ‘std’
  385 |       throw std::logic_error("node is a leaf but still claims to be movable");
      |                  ^~~~~~~~~~~
KDTree-inl.hh: In member function ‘const ValueType& KDTree<CoordType, dimensions, ValueType>::at(const KDTree<CoordType, dimensions, ValueType>::Point&) const [with CoordType = long int; long unsigned int dimensions = 2; ValueType = long int]’:
KDTree-inl.hh:206:1: error: control reaches end of non-void function [-Werror=return-type]
  206 | }
      | ^
cc1plus: all warnings being treated as errors
make: *** [<builtin>: KDTreeTest.o] Error 1
make: *** Waiting for unfinished jobs....```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants