]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkAny.h
#3480 Bug typeid in Macos
[bbtk.git] / kernel / src / bbtkAny.h
index 74efb3ecbf3028bb088290f1837ab9f91b600914..71edc872f423209239dde51d298720b0329c72b0 100644 (file)
@@ -344,9 +344,18 @@ namespace bbtk
                         <<"> with content : "
                         <<HumanTypeName(type())<<std::endl);
 
-      if ( type() == typeid(ValueType) )
-       return static_cast< anyholder<ValueType> *>(content)->held;
-
+        printf("EED bbtkAny get()   self=%s \n" , HumanTypeName<self >().c_str() );
+        printf("EED bbtkAny get()   ValueType=%s \n" , bbtk::HumanTypeName<ValueType>().c_str() );
+        printf("EED bbtkAny get()   Type=%s \n" , bbtk::HumanTypeName<>(type()).c_str()  );
+        printf("EED bbtkAny get()   type name=(-%s-) \n" , type().name()  );
+        printf("EED bbtkAny get()   ValueType name=(-%s-) \n" , typeid(ValueType).name()  );
+// 2021-12-15
+        if ( strcmp( type().name()  , typeid(ValueType).name() ) ==0 )
+//        if ( type() == typeid(ValueType) )
+        {
+            return static_cast< anyholder<ValueType> *>(content)->held;
+        }
+        
       bbtkError(HumanTypeName<self >()
                <<" get with type <"
                <<bbtk::HumanTypeName<ValueType>()