summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/list2
-rw-r--r--src/include/vector2
-rw-r--r--src/usr/testcore/lib/stltest.H11
3 files changed, 12 insertions, 3 deletions
diff --git a/src/include/list b/src/include/list
index f7b0195ad..1cb967c67 100644
--- a/src/include/list
+++ b/src/include/list
@@ -514,7 +514,7 @@ namespace std
* Default ctor
*/
__attribute__ ((always_inline)) inline
- explicit list()
+ list()
{
iv_node.reset();
}
diff --git a/src/include/vector b/src/include/vector
index da83776e8..1fab3d81a 100644
--- a/src/include/vector
+++ b/src/include/vector
@@ -79,7 +79,7 @@ namespace std
* @post The vector is created with no elements. size() == 0, capacity() == 0
*/
__attribute__ ((always_inline))
- explicit vector(void)
+ vector(void)
:
iv_start(NULL),
iv_finish(NULL),
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<int> > v = { {},{1},{1,2,3} };
+ std::list< std::list<int> > l = { {},{1},{1,2,3} };
+ }
+
};
#endif
OpenPOWER on IntegriCloud