mirror of git://gcc.gnu.org/git/gcc.git
				
				
				
			re PR c++/66421 (G++ fails compilation when assigning tuple created with variadic template to auto variable)
2015-07-08 Paolo Carlini <paolo.carlini@oracle.com> PR c++/66421 * g++.dg/cpp0x/auto45.C: New. From-SVN: r225563
This commit is contained in:
		
							parent
							
								
									bb9276646e
								
							
						
					
					
						commit
						529b9e5ad7
					
				|  | @ -1,3 +1,8 @@ | |||
| 2015-07-08  Paolo Carlini  <paolo.carlini@oracle.com> | ||||
| 
 | ||||
| 	PR c++/66421 | ||||
| 	* g++.dg/cpp0x/auto45.C: New. | ||||
| 
 | ||||
| 2015-07-08  Vladimir Makarov  <vmakarov@redhat.com> | ||||
| 
 | ||||
| 	PR middle-end/66334 | ||||
|  |  | |||
|  | @ -0,0 +1,21 @@ | |||
| // PR c++/66421
 | ||||
| // { dg-do compile { target c++11 } }
 | ||||
| 
 | ||||
| template<typename... T> struct tuple { }; | ||||
| 
 | ||||
| template<typename... T> tuple<T...> make_tuple(T&&...) { return {}; } | ||||
| 
 | ||||
| template <typename... Params> | ||||
| void foo(Params... params) { | ||||
|     auto t = make_tuple((int)params...); | ||||
| } | ||||
| 
 | ||||
| template <typename... Params> | ||||
| void bar(Params... params) { | ||||
|   tuple<decltype((int)params)...> t = make_tuple((int)params...); | ||||
| } | ||||
| 
 | ||||
| int main() { | ||||
|     foo(1,2,3); | ||||
|     bar(1,2,3); | ||||
| } | ||||
		Loading…
	
		Reference in New Issue
	
	 Paolo Carlini
						Paolo Carlini