Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use the "_t" and "_v" version of type traits.
[simgrid.git] / src / mc / remote / RemotePtr.hpp
index c17823e..16efc93 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2008-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -8,8 +8,7 @@
 
 #include "src/kernel/actor/ActorImpl.hpp"
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 /** HACK, A value from another process
  *
@@ -38,7 +37,7 @@ public:
   std::size_t get_buffer_size() const { return sizeof(T); }
   operator T() const
   {
-    static_assert(std::is_trivial<T>::value, "Cannot convert non trivial type");
+    static_assert(std::is_trivial_v<T>, "Cannot convert non trivial type");
     return *get_buffer();
   }
   void clear() { std::memset(&buffer, 0, sizeof buffer); }
@@ -135,7 +134,6 @@ template <class T = void> inline RemotePtr<T> remote(uint64_t p)
 {
   return RemotePtr<T>(p);
 }
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
 
 #endif