[LLVMbugs] [Bug 19374] New: Getting 'is not a member of' compiling error while accessing class member in nested class.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Apr 8 13:42:24 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19374
Bug ID: 19374
Summary: Getting 'is not a member of' compiling error while
accessing class member in nested class.
Product: clang
Version: 3.2
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: aurelien.ooms at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 12356
--> http://llvm.org/bugs/attachment.cgi?id=12356&action=edit
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
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140408/dddfc6e8/attachment.html>
More information about the llvm-bugs
mailing list