dxx-rebirth/common
Kp e3dbe7a07c Add workaround for gcc-4.7 type inheritance quirk
In gcc-4.7, a type inherited via using is distinct from a type defined
by using.

	$ cat t.cpp
	template <typename>
	class A
	{
	public:
	    typedef void a;
	    typedef void b;
	};

	template <typename T>
	class B : protected A<T>
	{
	protected:
	    using typename A<T>::a;
	    using b = typename A<T>::b;
	public:
	    static inline a f1();
	    static inline b f2();
	};

	template <typename T>
	typename B<T>::a B<T>::f1() {}	// fails for gcc-4.7, works in later

	template <typename T>
	typename B<T>::b B<T>::f2() {}	// works in both

	$ gcc-4.7 -Wall -Wextra -std=gnu++0x -O2 -c t.cpp
	t.cpp:21:18: error: prototype for 'typename B<T>::a B<T>::f1()' does not match any in class 'B<T>'
	t.cpp:16:18: error: candidate is: static typename A<T>::a B<T>::f1()
	t.cpp:16:18: warning: inline function 'static typename A<T>::a B<T>::f1() [with T = int; typename A<T>::a = void]' used but never defined [enabled by default]

	$ gcc-4.8 -Wall -Wextra -std=gnu++0x -O2 -c t.cpp
	$

Fixes: 8b7c5c3e2b ("Rewrite valptridx")
2015-08-05 02:59:03 +00:00
..
2d Use accessor for grs_bitmap::bm_type 2015-07-25 23:10:47 +00:00
3d Use forward-declaration header for gr.h 2015-07-25 23:10:45 +00:00
arch Use forward-declaration header for gr.h 2015-07-25 23:10:45 +00:00
editor Move similar/editor/autosave.cpp -> common/editor/autosave.cpp 2015-07-25 23:10:47 +00:00
include Add workaround for gcc-4.7 type inheritance quirk 2015-08-05 02:59:03 +00:00
main Simplify multiplayer sound handling 2015-08-05 02:59:02 +00:00
maths Remove dead AI fire leading code 2015-07-25 23:10:47 +00:00
mem Move similar/mem/mem.cpp -> common/mem/mem.cpp 2015-07-18 21:01:56 +00:00
misc Move similar/misc/hash.cpp -> common/misc/hash.cpp 2015-07-18 21:01:56 +00:00
texmap Move tmap scanline pointers to structure 2015-07-25 23:10:47 +00:00
ui Add non-aborting UserError for user-caused fatal errors 2015-06-16 03:15:40 +00:00