Hi Jonathan, [big fan of fluent c++, got to know you on cppcast]
I get this compile error with MSVC (Visual Studio 2017 15.3). That code is fine on gcc and clang.
/NamedType/named_type.hpp(26): error C2512: 'std::isreference<T>': no appropriate default constructor available
explicit NamedTypeImpl(T&& value, typename std::enable_if<!std::is_reference<T_>{}, std::nullptr_t>::type = nullptr)
while the following works (and to me looks more idiomatic):
explicit NamedTypeImpl(T&& value, typename std::enable_if < !std::is_reference<T_>::value, std::nullptr_t > ::type = nullptr) : value_(std::move(value)) {}
Diff is just
std::isreference<T>{}
becoming
std::isreference<T>::value
Hi Jonathan, [big fan of fluent c++, got to know you on cppcast]
I get this compile error with MSVC (Visual Studio 2017 15.3). That code is fine on gcc and clang.
explicit NamedTypeImpl(T&& value, typename std::enable_if<!std::is_reference<T_>{}, std::nullptr_t>::type = nullptr)
while the following works (and to me looks more idiomatic):explicit NamedTypeImpl(T&& value, typename std::enable_if < !std::is_reference<T_>::value, std::nullptr_t > ::type = nullptr) : value_(std::move(value)) {}
Diff is just std::isreference<T>{} becoming std::isreference<T>::value
Would you accept a PR for that ?