<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Getting 'is not a member of' compiling error while accessing class member in nested class."
href="http://llvm.org/bugs/show_bug.cgi?id=19374">19374</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Getting 'is not a member of' compiling error while accessing class member in nested class.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>aurelien.ooms@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=12356" name="attach_12356" title="Working example archive.">attachment 12356</a> <a href="attachment.cgi?id=12356&action=edit" title="Working example archive.">[details]</a></span>
Working example archive.
Working example in attachement file
# make clean all COMPILER=g++
produces no error while
# make clean all COMPILER=clang++
outputs
h/pfsp/pivoting/best.hpp:47:20: error: 'pfsp::pivoting::best(const
std::vector<unsigned long, std::allocator<unsigned long> > &, void (*)(const
std::vector<unsigned long, std::allocator<unsigned long> > &,
pfsp::pivoting::functor<std::tuple<unsigned long, unsigned long> > *),
pfsp::eval::functor<int, std::vector<unsigned long, std::allocator<unsigned
long> >, std::tuple<unsigned long, unsigned long>, lib::array::proxy<int>,
std::vector<int, std::allocator<int> > > *)::fn::operator()(const
std::tuple<unsigned long, unsigned long> &)::fn::e' is not a member of class
'fn'
The problem seems to be that in h/pfsp/pivoting/best.hpp:47:20 I don't access
the class members using the this keyword. Adding this-> for all member access
in h/pfsp/pivoting/best.hpp and h/pfsp/pivoting/first.hpp solves the issue but
the program will not compile and strange warnings/errors pop up:
warning: field 'e' will be initialized after field 'sol' [-Wreorder]
warning: field 'sol' will be initialized after field 'opt' [-Wreorder]
warning: field 'opt' will be initialized after field 'argopt' [-Wreorder]
error: constructor for 'fn' must explicitly initialize the reference member
'sol'
('Strange' because I don't see what's the problem..)
-v
==
g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.8.1-10ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu9)
clang++ -v
Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
Target: x86_64-pc-linux-gnu
Thread model: posix</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>