Kaynağa Gözat

Fixing macros for scope_exit.hpp

Samuel Jaffe 9 yıl önce
ebeveyn
işleme
9729eef237
1 değiştirilmiş dosya ile 4 ekleme ve 2 silme
  1. 4 2
      util/scope_exit.hpp

+ 4 - 2
util/scope_exit.hpp

@@ -9,8 +9,10 @@
 
 #include <functional>
 
-#include "macro.h"
-
+#undef CONCAT2
+#define CONCAT2(A, B) A##B
+#undef CONCAT
+#define CONCAT(A, B) CONCAT2(A, B)
 #define scope(type) scope_##type##_t CONCAT( scope_,CONCAT( type, __LINE__ ) ) = [&]()
 
 class scope_exit_t {