Detect -Wnarrowing constructor calls even without inheritance

This commit is contained in:
Kp 2014-11-26 02:57:36 +00:00
parent 1559ebbe9e
commit d0ec27898b

View file

@ -712,7 +712,7 @@ help:assume compiler supports variadic template-based constructor forwarding
macro_value = self._quote_macro_value('''
template <typename... Args>
D(Args&&... args) :
B,##__VA_ARGS__(std::forward<Args>(args)...) {}
B,##__VA_ARGS__{std::forward<Args>(args)...} {}
''')
if self.Cxx11Compile(context, text='#include <algorithm>\n' + text.format(macro_value=macro_value, **fmtargs), msg='for C++11 variadic templates on constructors', **kwargs):
return macro_value