template <BOOST_PP_CAT(name, _chooser_value_type) (*KeyFn)()> \
struct BOOST_PP_CAT(name, _key_value_template) \
: public senf::detail::VariantKey<BOOST_PP_CAT(name, _chooser_value_type), KeyFn> {}; \
- template <class T, T (*K)()> friend class senf::detail::VariantKey; \
+ template <class T, T (*K)()> friend class senf::detail::VariantKey; \
typedef senf::detail::VariantKeyTransform< \
BOOST_PP_CAT(name,_chooser_value_type), \
boost::mpl::vector< \
};
}
-namespace {
+// We can't use the unnamed namespace here since there's a bug in gcc-4.2.3 which is
+// the default version of gcc on ubuntu hardy :-(
+// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34213
+namespace VariantParser_test_cc_anon_namespace {
struct SubParser : public senf::PacketParserBase
{
SENF_PARSER_SKIP_BITS( 4 );
SENF_PARSER_BITFIELD_RO( type, 4, unsigned );
SENF_PARSER_VARIANT( content_, type,
- ( novalue( nocontent
-, key(10, senf::VoidPacketParser)) )
+ ( novalue( nocontent, key(10, senf::VoidPacketParser)) )
( id( content, SubParser ) )
);
};
}
+using namespace VariantParser_test_cc_anon_namespace;
BOOST_AUTO_UNIT_TEST(VariantParserMacro)
{
rv = {}
map(rv.setdefault,f)
for c in f:
- map(rv.setdefault,recursiveChildren(c.children()))
+ if c is not None : map(rv.setdefault,recursiveChildren(c.children()))
return rv.keys()
def filterIncludes(files, extensions):
return [ f for f in files
- if f.get_suffix() in extensions ]
+ if f is not None and f.get_suffix() in extensions ]
def filterIncludesInv(files, extensions):
return [ f for f in files
- if '.' + str(f).split('.',1)[-1] not in extensions ]
+ if f is not None and '.' + str(f).split('.',1)[-1] not in extensions ]
def filterDirectory(files, dir):
return [ f for f in files
- if f.abspath.startswith(dir.abspath) ]
+ if f is not None and f.abspath.startswith(dir.abspath) ]
def excludeDirectories(files, dirs):
return [ f for f in files
if compileTestSources:
test.extend(env.CompileCheck(source = compileTestSources))
env.Alias('all_tests', test)
- env.Alias(env.File('test'), test)
+ env.Command(env.File('test'), test, [])
+ #env.Alias(env.File('test'), test)
## \brief Build object files
if sources:
obsources = [ source
for source in sources
- if not str(source).endswith('.o') ]
+ if type(source) is type('') and not source.endswith('.o') ]
objects = [ source
for source in sources
- if str(source).endswith('.o') ]
+ if type(source) is not type('') or source.endswith('.o') ]
if obsources:
objects += env.Object(obsources)
# Hmm ... here I'd like to use an Alias instead of a file
# however the alias does not seem to live in the subdirectory
# which breaks 'scons -u test'
- env.Alias(env.File('test'), test)
+ env.Command(env.File('test'), test, [])
+ #env.Alias(env.File('test'), test)
return objects