Bugzilla – Bug 1365
[LLVM] error: 'QueueElement' is a private member of 'ns3::WimaxMacQueue'
Last modified: 2012-03-09 12:09:17 UTC
I was trying to compile ns-3 with clang++ (LLVM), and it complains about a private structure being used. It would seem clang++ is right... [ 640/1334] cxx: src/wimax/model/bs-scheduler-rtps.cc -> build/src/wimax/model/bs-scheduler-rtps.cc.1.o 11:03:56 runner ['/usr/bin/clang++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-Wno-array-bounds', '-fPIC', '-pthread', '-pthread', '-pthread', '-Ibuild', '-I.', '-I/usr/include/gtk-2.0', '-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include', '-I/usr/include/atk-1.0', '-I/usr/include/cairo', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/pango-1.0', '-I/usr/include/gio-unix-2.0', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/pixman-1', '-I/usr/include/freetype2', '-I/usr/include/libpng12', '-I/usr/include/libxml2', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DSQLITE3=1', '-DHAVE_IF_TUN_H=1', '-DENABLE_GSL', '../src/wimax/model/bs-scheduler-rtps.cc', '-c', '-o', 'src/wimax/model/bs-scheduler-rtps.cc.1.o'] ../src/wimax/model/bs-scheduler-rtps.cc:497:29: error: 'QueueElement' is a private member of 'ns3::WimaxMacQueue' std::deque<WimaxMacQueue::QueueElement>::const_iterator iter3; ^ In file included from ../src/wimax/model/bs-scheduler-rtps.cc:22: In file included from ../src/wimax/model/bs-scheduler-rtps.h:32: In file included from ../src/wimax/model/bs-scheduler.h:31: In file included from ../src/wimax/model/service-flow.h:27: In file included from ../src/wimax/model/wimax-connection.h:29: ../src/wimax/model/wimax-mac-queue.h:121:10: note: declared private here struct QueueElement ^ 1 error generated.
Created attachment 1353 [details] Path to change QueueElement to public Path to solve the problem, of "'QueueElement' is a private". The patch changes QueueElement to public. I don't know if it is the best solution, the maintainer should evaluate if this is the best approach.
there was a simpler solution; delete the unused variable declaration: changeset dc30a80a59ac