Skip to content

Commit 5e46304

Browse files
committed
test MSVC default conformance mode, using its legacy lambda processor
The added "test_release_x64_legacy_lambda.vcxproj" is basically just a copy of "test_release_x64.vcxproj", but it has an extra property `ConformanceMode`, set to `Default`. Which triggers MSVC to use its "legacy lambda processor". With such a configuration, the user may need to define `TOML_DISABLE_CONDITIONAL_NOEXCEPT_LAMBDA`. Follow-up to commit cbc00d6 "add TOML_DISABLE_CONDITIONAL_NOEXCEPT_LAMBDA workaround MSVC error C2057 (marzer#247)"
1 parent cb34735 commit 5e46304

File tree

2 files changed

+135
-0
lines changed

2 files changed

+135
-0
lines changed
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Release|x64">
5+
<Configuration>Release</Configuration>
6+
<Platform>x64</Platform>
7+
</ProjectConfiguration>
8+
</ItemGroup>
9+
<PropertyGroup Label="Globals">
10+
<VCProjectVersion>16.0</VCProjectVersion>
11+
<ProjectGuid>{D318404F-B9AB-4CFB-AEF1-92CE23369837}</ProjectGuid>
12+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
13+
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
14+
</PropertyGroup>
15+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
16+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
17+
<ConfigurationType>Application</ConfigurationType>
18+
<UseDebugLibraries>true</UseDebugLibraries>
19+
<PlatformToolset>v143</PlatformToolset>
20+
<CharacterSet>MultiByte</CharacterSet>
21+
</PropertyGroup>
22+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
23+
<ConfigurationType>Application</ConfigurationType>
24+
<UseDebugLibraries>false</UseDebugLibraries>
25+
<PlatformToolset>v143</PlatformToolset>
26+
<WholeProgramOptimization>true</WholeProgramOptimization>
27+
<CharacterSet>MultiByte</CharacterSet>
28+
</PropertyGroup>
29+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
30+
<ImportGroup Label="PropertySheets">
31+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
32+
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
33+
</ImportGroup>
34+
<Import Project="../../toml++.props" />
35+
<ItemDefinitionGroup>
36+
<ClCompile>
37+
<AdditionalIncludeDirectories>..\tests;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
38+
<ExceptionHandling>Sync</ExceptionHandling>
39+
<PrecompiledHeader>Use</PrecompiledHeader>
40+
<PrecompiledHeaderFile>tests.hpp</PrecompiledHeaderFile>
41+
<PreprocessorDefinitions>TOML_ENABLE_UNRELEASED_FEATURES=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
42+
<PreprocessorDefinitions>LEAK_TESTS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
43+
<PreprocessorDefinitions Condition="'%(ExceptionHandling)'=='false'">_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
44+
<PreprocessorDefinitions Condition="'%(ExceptionHandling)'=='false'">SHOULD_HAVE_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
45+
<PreprocessorDefinitions Condition="'%(ExceptionHandling)'!='false'">SHOULD_HAVE_EXCEPTIONS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
46+
<LanguageStandard>stdcpp17</LanguageStandard>
47+
<MultiProcessorCompilation>true</MultiProcessorCompilation>
48+
<WarningLevel>EnableAllWarnings</WarningLevel>
49+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4127</DisableSpecificWarnings> <!-- conditional expr is constant -->
50+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4324</DisableSpecificWarnings> <!-- structure was padded due to alignment specifier -->
51+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4464</DisableSpecificWarnings> <!-- relative include path contains '..' -->
52+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4505</DisableSpecificWarnings> <!-- unreferenced local function removed -->
53+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4514</DisableSpecificWarnings> <!-- unreferenced inline function has been removed -->
54+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4577</DisableSpecificWarnings> <!-- 'noexcept' used with no exception handling mode specified -->
55+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4582</DisableSpecificWarnings> <!-- constructor is not implicitly called -->
56+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4623</DisableSpecificWarnings> <!-- default constructor was implicitly defined as deleted -->
57+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4625</DisableSpecificWarnings> <!-- copy constructor was implicitly defined as deleted -->
58+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4626</DisableSpecificWarnings> <!-- assignment operator was implicitly defined as deleted -->
59+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4710</DisableSpecificWarnings> <!-- function not inlined -->
60+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4711</DisableSpecificWarnings> <!-- function selected for automatic expansion -->
61+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4738</DisableSpecificWarnings> <!-- storing 32-bit float result in memory -->
62+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4820</DisableSpecificWarnings> <!-- N bytes padding added -->
63+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4866</DisableSpecificWarnings> <!-- compiler may not enforce ltr eval in operator[] -->
64+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4868</DisableSpecificWarnings> <!-- compiler may not enforce ltr eval in initializer list -->
65+
<DisableSpecificWarnings>%(DisableSpecificWarnings);4946</DisableSpecificWarnings> <!-- reinterpret_cast used between related classes -->
66+
<DisableSpecificWarnings>%(DisableSpecificWarnings);5026</DisableSpecificWarnings> <!-- move constructor was implicitly defined as deleted -->
67+
<DisableSpecificWarnings>%(DisableSpecificWarnings);5027</DisableSpecificWarnings> <!-- move assignment operator was implicitly defined as deleted -->
68+
<DisableSpecificWarnings>%(DisableSpecificWarnings);5039</DisableSpecificWarnings> <!-- potentially throwing function passed to 'extern "C"' -->
69+
<DisableSpecificWarnings>%(DisableSpecificWarnings);5045</DisableSpecificWarnings> <!-- Compiler will insert Spectre mitigation -->
70+
<ConformanceMode>Default</ConformanceMode> <!-- Default Conformance Mode implies using the legacy lambda processor -->
71+
</ClCompile>
72+
</ItemDefinitionGroup>
73+
<PropertyGroup>
74+
<LocalDebuggerWorkingDirectory>$(ProjectDir)..\</LocalDebuggerWorkingDirectory>
75+
</PropertyGroup>
76+
<ItemGroup>
77+
<ClCompile Include="..\at_path.cpp" />
78+
<ClCompile Include="..\path.cpp" />
79+
<ClCompile Include="..\conformance_burntsushi_invalid.cpp" />
80+
<ClCompile Include="..\conformance_burntsushi_valid.cpp" />
81+
<ClCompile Include="..\conformance_iarna_invalid.cpp" />
82+
<ClCompile Include="..\conformance_iarna_valid.cpp" />
83+
<ClCompile Include="..\for_each.cpp" />
84+
<ClCompile Include="..\formatters.cpp" />
85+
<ClCompile Include="..\impl_toml.cpp">
86+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
87+
</ClCompile>
88+
<ClCompile Include="..\main.cpp">
89+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
90+
</ClCompile>
91+
<ClCompile Include="..\manipulating_arrays.cpp" />
92+
<ClCompile Include="..\manipulating_tables.cpp" />
93+
<ClCompile Include="..\manipulating_parse_result.cpp" />
94+
<ClCompile Include="..\manipulating_values.cpp" />
95+
<ClCompile Include="..\parsing_arrays.cpp" />
96+
<ClCompile Include="..\parsing_booleans.cpp" />
97+
<ClCompile Include="..\parsing_comments.cpp" />
98+
<ClCompile Include="..\parsing_dates_and_times.cpp" />
99+
<ClCompile Include="..\parsing_floats.cpp" />
100+
<ClCompile Include="..\parsing_integers.cpp" />
101+
<ClCompile Include="..\parsing_key_value_pairs.cpp" />
102+
<ClCompile Include="..\parsing_spec_example.cpp" />
103+
<ClCompile Include="..\parsing_strings.cpp" />
104+
<ClCompile Include="..\parsing_tables.cpp" />
105+
<ClCompile Include="..\tests.cpp">
106+
<PrecompiledHeader>Create</PrecompiledHeader>
107+
</ClCompile>
108+
<ClCompile Include="..\user_feedback.cpp" />
109+
<ClCompile Include="..\using_iterators.cpp" />
110+
<ClCompile Include="..\visit.cpp" />
111+
<ClCompile Include="..\windows_compat.cpp" />
112+
</ItemGroup>
113+
<ItemGroup>
114+
<Natvis Include="..\..\toml++.natvis" />
115+
</ItemGroup>
116+
<ItemGroup>
117+
<ClInclude Include="..\leakproof.hpp" />
118+
<ClInclude Include="..\lib_catch2.hpp" />
119+
<ClInclude Include="..\lib_tloptional.hpp" />
120+
<ClInclude Include="..\settings.hpp" />
121+
<ClInclude Include="..\tests.hpp" />
122+
</ItemGroup>
123+
<ItemGroup>
124+
<None Include="..\cpp.hint" />
125+
<None Include="..\meson.build" />
126+
</ItemGroup>
127+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
128+
</Project>

toml++.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_release_x64_cpplatest_
5959
EndProject
6060
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_release_x64_cpplatest_unrel", "tests\vs\test_release_x64_cpplatest_unrel.vcxproj", "{74813AFD-DB22-52FA-9108-0BADD4B0E161}"
6161
EndProject
62+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_release_x64_legacy_lambda", "tests\vs\test_release_x64_legacy_lambda.vcxproj", "{D318404F-B9AB-4CFB-AEF1-92CE23369837}"
63+
EndProject
6264
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_release_x64_noexcept", "tests\vs\test_release_x64_noexcept.vcxproj", "{B1B28D93-892C-59BF-9C6F-D813EC6438A0}"
6365
EndProject
6466
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_release_x64_noexcept_unrel", "tests\vs\test_release_x64_noexcept_unrel.vcxproj", "{6C3EA8CD-33CC-5775-ACC4-631FF5FE1E2C}"
@@ -265,6 +267,10 @@ Global
265267
{E467EB97-B066-4D38-B3DB-60961E3F96A1}.Debug|x64.Build.0 = Debug|x64
266268
{E467EB97-B066-4D38-B3DB-60961E3F96A1}.Release|x64.ActiveCfg = Release|x64
267269
{E467EB97-B066-4D38-B3DB-60961E3F96A1}.Release|x64.Build.0 = Release|x64
270+
{D318404F-B9AB-4CFB-AEF1-92CE23369837}.Debug|x64.ActiveCfg = Release|x64
271+
{D318404F-B9AB-4CFB-AEF1-92CE23369837}.Debug|x64.Build.0 = Release|x64
272+
{D318404F-B9AB-4CFB-AEF1-92CE23369837}.Release|x64.ActiveCfg = Release|x64
273+
{D318404F-B9AB-4CFB-AEF1-92CE23369837}.Release|x64.Build.0 = Release|x64
268274
EndGlobalSection
269275
GlobalSection(SolutionProperties) = preSolution
270276
HideSolutionNode = FALSE
@@ -311,6 +317,7 @@ Global
311317
{8F673261-5DFE-4B67-937A-61FC3F0082A2} = {5DE43BF4-4EDD-4A7A-A422-764415BB3224}
312318
{723FC4CA-0E24-4956-8FDC-E537EA3847AA} = {4E25CF88-D7D8-4A9C-A52E-0D78281E82EC}
313319
{E467EB97-B066-4D38-B3DB-60961E3F96A1} = {412816A5-9D22-4A30-BCDF-ABFB54BB3735}
320+
{D318404F-B9AB-4CFB-AEF1-92CE23369837} = {4E25CF88-D7D8-4A9C-A52E-0D78281E82EC}
314321
EndGlobalSection
315322
GlobalSection(ExtensibilityGlobals) = postSolution
316323
SolutionGuid = {0926DDCC-88CD-4839-A82D-D9B99E02A0B1}

0 commit comments

Comments
 (0)