From 02eeaa234cffc6463b27b68d8eef908aec30327d Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Fri, 13 May 2016 11:04:25 -0500 Subject: Vector and list initializer lists fail with {} contructor The initializer list with C++14 now requires we have a non-explicit default constructor in list and vector Change-Id: Iec9e77aedd48c97e3c1c49cfa43274098bd56a03 RTC: 153890 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24518 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Christian R. Geddes Reviewed-by: Martin Gloff Reviewed-by: A. P. Williams III Reviewed-by: Matthew A. Ploetz --- src/usr/testcore/lib/stltest.H | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/usr/testcore') diff --git a/src/usr/testcore/lib/stltest.H b/src/usr/testcore/lib/stltest.H index e5df880dc..c75802ede 100644 --- a/src/usr/testcore/lib/stltest.H +++ b/src/usr/testcore/lib/stltest.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2016 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -473,5 +475,12 @@ class STLTest : public CxxTest::TestSuite } + void testInitListCompile() + { + // Code wont compile if this doesn't work + std::vector< std::vector > v = { {},{1},{1,2,3} }; + std::list< std::list > l = { {},{1},{1,2,3} }; + } + }; #endif -- cgit v1.2.3