clang: Enable -Weverything, fix all warnings
This change fixes the following warnings:
```
-Wc++98-compat-extra-semi
-Wc++98-compat-local-type-template-args
-Wc++98-compat-pedantic
-Wc++98-compat
-Wcomma
-Wdeprecated-copy-dtor
-Wexit-time-destructors
-Wextra-semi-stmt
-Wextra-semi
-Wfloat-conversion
-Wfloat-equal
-Wformat-nonliteral
-Wglobal-constructors
-Winconsistent-missing-destructor-override
-Wnon-virtual-dtor
-Wold-style-cast
-Wpadded
-Wreturn-std-move-in-c++11
-Wshadow-field-in-constructor
-Wshadow-uncaptured-local
-Wshift-sign-overflow
-Wsign-conversion
-Wundef
-Wunreachable-code-return
-Wused-but-marked-unused
-Wweak-vtables
-Wzero-as-null-pointer-constant
```
This commit is contained in:
@@ -72,7 +72,7 @@ variant<T0, Types...>::variant() : value(T0()) {}
|
||||
|
||||
template <typename T0, typename... Types>
|
||||
template <typename T>
|
||||
variant<T0, Types...>::variant(const T& value) : value(value) {
|
||||
variant<T0, Types...>::variant(const T& v) : value(v) {
|
||||
static_assert(accepts<T>(), "variant does not accept template type T");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user