5 template<typename T
> inline void permute(T
& a
,T
& b
, T
& c
) { T t
=a
; a
=b
; b
=c
; c
=t
; }
8 #define color_components(c) (c)[0],(c)[1],(c)[2]
10 // "foreach" macros, more useful to me than BOOST_FOREACH:
15 { typedef typename
T::const_iterator type
; };
19 { typedef typename
T::iterator type
; };
22 #define const_foreach(i,container) \
23 for (goir::const_iter<typeof(container)>::type i = container.begin(); \
24 i != container.end(); i++)
26 #define foreach(i,container) \
27 for (goir::iter<typeof(container)>::type i = container.begin(); \
28 i != container.end(); i++)
30 #endif // _GOIR_UTIL_HH