I have sequence of tuples: '(int,double)(char)()'
I need to detect tuple is empty or not. But BOOST_PP_TUPLE_SIZE() returns 1 even if tuple is empty.
Tell me please, how can I check that a tuple does not contain the elements?
Edit1 Example:
#include <boost/preprocessor/tuple/size.hpp>
#define tuple0 ()
#define tuple1 (1)
#define tuple2 (1,2)
0:BOOST_PP_TUPLE_SIZE(tuple0) // -> 1
1:BOOST_PP_TUPLE_SIZE(tuple1) // -> 1
2:BOOST_PP_TUPLE_SIZE(tuple2) // -> 2
Solution based on the: http://gustedt.wordpress.com/2010/06/08/detect-empty-macro-arguments/
Result: