Bug 1365 - [LLVM] error: 'QueueElement' is a private member of 'ns3::WimaxMacQueue'
[LLVM] error: 'QueueElement' is a private member of 'ns3::WimaxMacQueue'
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wimax
ns-3-dev
All All
: P5 normal
Assigned To: Flavio Kubota
:
Depends on:
Blocks: 1345
  Show dependency treegraph
 
Reported: 2012-02-22 06:08 UTC by Gustavo J. A. M. Carneiro
Modified: 2012-03-09 12:09 UTC (History)
2 users (show)

See Also:


Attachments
Path to change QueueElement to public (788 bytes, patch)
2012-03-09 08:33 UTC, Daniel Camara
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo J. A. M. Carneiro 2012-02-22 06:08:40 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.
Comment 1 Daniel Camara 2012-03-09 08:33:04 UTC
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.
Comment 2 Tom Henderson 2012-03-09 12:09:17 UTC
there was a simpler solution; delete the unused variable declaration:  changeset dc30a80a59ac