Several gcc and clang fixes

This superseeds also f1199793 by a cleaner workaround.
This commit is contained in:
Roland Winklmeier
2015-03-24 02:06:16 +01:00
committed by Roland Winklmeier
parent 70e42c0bee
commit ab98009996
4 changed files with 4 additions and 20 deletions

View File

@@ -165,7 +165,7 @@ namespace BlackMisc
/*!
* \brief Access the first element, or a default-initialized value if the sequence is empty.
*/
const_reference frontOrDefault() const { static const value_type def; return empty() ? def : front(); }
const_reference frontOrDefault() const { static const value_type def {}; return empty() ? def : front(); }
/*!
* \brief Access the first element, or a default-initialized value if the sequence is empty.