Open GoogleCodeExporter opened 9 years ago
I have the same problem.
Original comment by qbowa...@gmail.com
on 29 May 2012 at 4:14
Do we have a solution to this??
Original comment by muthukum...@gmail.com
on 5 Jun 2012 at 12:02
Replacing the typeof line with something like this seems to work (for the test
code, breakpad itself obviously no longer compiles):
typedef std::remove_reference<decltype(((struct user*)
0)->u_debugreg[0])>::type debugreg_t;
The problem then is how to properly detect typeof/decltype availability at
compile time.
Original comment by christia...@gmail.com
on 5 Jun 2012 at 2:53
The following workaround works for me, though I'm not sure how reliable it is
to just check the value of __cplusplus.
#if __cplusplus > 199711L
#include <type_traits>
#endif
...
#if __cplusplus > 199711L
typedef std::remove_reference<
decltype(((struct user*) 0)->u_debugreg[0])
>::type debugreg_t;
#else
typedef typeof(((struct user*) 0)->u_debugreg[0]) debugreg_t;
#endif
Original comment by nshutchi...@gmail.com
on 5 Jul 2012 at 2:08
Another workaround is to compile with "-std=gnu++0x", which enables typeof as
well.
Original comment by christia...@gmail.com
on 6 Jul 2012 at 3:55
I am using g++ 3.4.4 and having the same issue. Is there any solution for this
problem ?
Original comment by jain.she...@gmail.com
on 28 Jan 2013 at 10:14
Issue 563 has been merged into this issue.
Original comment by wfh@chromium.org
on 24 Apr 2014 at 3:34
Issue 586 has been merged into this issue.
Original comment by ted.mielczarek
on 5 May 2014 at 7:00
Patch which replaces typeof() with a wrapper that uses decltype<T> and
std::remove_reference<T>() under C++11.
This also addresses the issue of spaces between string literals and identifiers.
From our fork at
https://github.com/Mendeley/breakpad/commit/17473504d4d1ee53a1e3e4f3ca5dc54671eb
258b
Original comment by robertkn...@gmail.com
on 22 Jul 2014 at 2:27
Attachments:
something like #define typeof __typeof__ should work too
Original comment by iiv...@productengine.com
on 16 Nov 2014 at 10:46
Original issue reported on code.google.com by
christia...@gmail.com
on 23 May 2012 at 1:54