瀏覽代碼

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 年之前
父節點
當前提交
25ab833052
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);