Skip to content

cannot build with clang++ #64

@roblatham00

Description

@roblatham00

Trying to compile BwTree with clang++, I get these warnings that don't make a lot of sense to me:

In file included from ./test/main.cpp:2:
In file included from ./test/test_suite.h:20:
./test/../src/bwtree.h:9394:5: error: 'GarbageNode' is a private member of
      'wangziqi2013::bwtree::BwTreeBase'
    GarbageNode *garbage_node_p = \  
    ^
./test/../src/bwtree.h:210:9: note: implicitly declared private here
  class GarbageNode {
        ^
./test/../src/bwtree.h:9395:11: error: 'GarbageNode' is a private member of
      'wangziqi2013::bwtree::BwTreeBase'
      new GarbageNode{GetGlobalEpoch(), (void *)(node_p)};
          ^
./test/../src/bwtree.h:210:9: note: implicitly declared private here
  class GarbageNode {

those declarations look public to me, and trying to mimic your class structure with a small test case did not cause any problems. I clearly oversimplified...

class Foo {
    class Bar {
        public:
            Bar(int a, int b) {}
    };
    void do_stuff() {
        Bar *bar_p = new Bar{5, 10};
    }
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions