C++ Macro to replace text with nothing -


MacOS is often used for text replacement. In my case, I have to wipe certain keywords conditionally, so that The compilation is possible in those specific composers which are not specific features.

Especially I see where this snippet comes from

  template & lt; Typename C & gt; Structure is_ size {template & lt; Typename T & gt; Static constexpr auto check (t *) - & gt; // Problem VS2013 typename std :: is_integral & lt; Decltype (std :: declval & lt; t const & gt; () size ()) & gt; :: type; // more stuff};  

I am giving it as an example which was causing the question. In the above code, I

  template & lt; Typename T & gt; Fixed #if COMPILE_WITH_GCC_NEW_ENOUGH constexpr #endif auto-check (T *) - & gt;  

Because there were other parts where constexpr was to be replaced with the const so that it could be compiled.

What I am asking is a way to say like

  define # constexpr ?????????  

so that it will be replaced by constexpr in GCC coordinates and nothing from text in VS coordinators.

Definitely, just:

  #define constexpr  

nothing will expand to constexpr You can wrap this macro definition for your compiler inside the appropriate #if Does not support

Sometimes people make the "blank" detail more pronounced:

  #define constexpr / * nothing * /  
< / Div>

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -