forked from boostorg/typeof
refactored template encoding in polymorphic-like manner
[SVN r2455]
This commit is contained in:
1 parent
f2bfe9dff9
commit
ef69402869
6 files changed
+135
-239
No files matched your search
@@ -61,55 +61,3 @@ void test_spirit2()
|
||||
if (!success)
|
||||
throw 0;
|
||||
}
|
||||
|
||||
#pragma message("compiling integral param wrapper...")
|
||||
|
||||
namespace test_integral
|
||||
{
|
||||
// Enum template parameter
|
||||
enum E{ONE, TWO, THREE};
|
||||
|
||||
template<E e> struct foo
|
||||
{
|
||||
static const E value = e;
|
||||
};
|
||||
|
||||
// dependent template parameter
|
||||
template<class T, T n> struct bar
|
||||
{};
|
||||
|
||||
// multi-word template parameter
|
||||
template<unsigned long int n> struct blah
|
||||
{};
|
||||
}
|
||||
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE_X(test_integral::foo,
|
||||
(BOOST_TYPEOF_INTEGRAL(test_integral::E))
|
||||
);
|
||||
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE_X(test_integral::blah,
|
||||
(BOOST_TYPEOF_INTEGRAL(unsigned long int))
|
||||
);
|
||||
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE_X(test_integral::bar,
|
||||
(class)
|
||||
(BOOST_TYPEOF_INTEGRAL(P0))
|
||||
);
|
||||
|
||||
namespace test_integral
|
||||
{
|
||||
void test()
|
||||
{
|
||||
foo<TWO> x;
|
||||
bar<int, 5> xx;
|
||||
blah<5> xxx;
|
||||
|
||||
BOOST_AUTO(y, x);
|
||||
BOOST_AUTO(yy, xx);
|
||||
BOOST_AUTO(yyy, xxx);
|
||||
|
||||
y;
|
||||
yy;
|
||||
yyy;
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,6 @@
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="C:\boost\boost_1_32_0;..\..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
GeneratePreprocessedFile="0"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
@@ -69,8 +68,9 @@
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""C:\ark\boost-sandbox\boost-sandbox""
|
||||
AdditionalIncludeDirectories="C:\boost\boost_1_32_0;..\..\..\.."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
GeneratePreprocessedFile="0"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
@@ -172,6 +172,9 @@
|
||||
<File
|
||||
RelativePath="..\..\..\..\boost\typeof\register_fundamental.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\boost\typeof\register_integral.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\boost\typeof\compliant\register_mem_functions.hpp">
|
||||
</File>
|
||||
|
||||
@@ -276,6 +276,7 @@ void odr_test()
|
||||
int main()
|
||||
{
|
||||
odr_test();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#pragma message("done!")
|
||||
Reference in new issue
Block a user