Ver código fonte

cppdap: Use std::is_same<>::value instead of std::is_same<>() for old LCC

std::is_same<>() is not const instead of std::is_same<>::value
at least on LCC 1.21, so this produces an error. Still ()-notation
seems to be fairly equivalent functionally to ::value-notation.
makise-homura 1 ano atrás
pai
commit
25ab833052
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      Utilities/cmcppdap/include/dap/any.h

+ 1 - 1
Utilities/cmcppdap/include/dap/any.h

@@ -159,7 +159,7 @@ any& any::operator=(const std::nullptr_t&) {
 
 template <typename T>
 T& any::get() const {
-  static_assert(!std::is_same<T, std::nullptr_t>(),
+  static_assert(!std::is_same<T, std::nullptr_t>::value,
                 "Cannot get nullptr from 'any'.");
   assert(is<T>());
   return *reinterpret_cast<T*>(value);