iostream - C++ stream log Objective-C objects -


I am trying to write a C ++ stream logger which is capable of printing purpose-C + + variables . The problem is that obj-c is the method that gives me the details of the object, when calling, I can not get it to compile due to template typing.

I have some suggestions on how to do it.

thanks

  for operator #ifdef __OBJC__ // & lt; & Lt; #import on Obj-c objects & lt; Foundation / Foundation. H & gt; #important & lt; Coralocace / Core Lection. H & gt; // To obtain SFINAE whether we have an obj-c class or not template & lt; Class T & gt; Struct isObjectiveCClass {yesT = char (and) by [10]; Using noT = char (& amp;) [1]; Select static yesT (ID); Do not select static (...); Static t make (); Enum {value = sizeof (select (make)) == shape (hanti)}; }; #endif Square Logger {... Template & lt; Typename T & gt; Logger and operator & lt; & Lt; (T Data) {#if __OBJC__ If (IsObjectiveCClass  :: Value) {... how to cast obj data without errors? ... stream-> ts & lt; & Lt; [[Obj description] UTF8String]; } And (#endif->> ts  #if __OBJC__} #endif}    

Try something like

  template  struct is_objc_class: std :: false_type {}; template  Struct is_objc_class & lt; T, typename std :: enable_if    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -