Skip to content

Commit 6ea5bd6

Browse files
WIP workaround for missing default rules in VS2013
1 parent 76f2064 commit 6ea5bd6

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

src/goto-programs/replace_function_bodies.cpp

+27
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,33 @@ replace_function_body_optionst parse_replace_function_body_optionst(
347347
return {function_regex, only_generate, std::move(replace_function_bodies)};
348348
}
349349

350+
replace_function_body_optionst::replace_function_body_optionst(
351+
std::regex functions_regex,
352+
bool only_generate,
353+
std::unique_ptr<replace_function_bodiest> replace_function_bodies)
354+
: functions_regex(std::move(functions_regex)),
355+
only_generate(only_generate),
356+
replace_function_bodies(std::move(replace_function_bodies))
357+
{
358+
}
359+
360+
replace_function_body_optionst::replace_function_body_optionst(
361+
replace_function_body_optionst &&other)
362+
: functions_regex(std::move(other.functions_regex)),
363+
only_generate(other.only_generate),
364+
replace_function_bodies(std::move(other.replace_function_bodies))
365+
{
366+
}
367+
368+
replace_function_body_optionst &replace_function_body_optionst::
369+
operator=(replace_function_body_optionst &&other)
370+
{
371+
functions_regex = std::move(other.functions_regex);
372+
only_generate = other.only_generate;
373+
replace_function_bodies = std::move(other.replace_function_bodies);
374+
return *this;
375+
}
376+
350377
/// Replace function bodies with some default behavior
351378
/// A list of currently accepted command line arguments
352379
/// + the type of bodies generated by them

src/goto-programs/replace_function_bodies.h

+18
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,24 @@ struct replace_function_body_optionst
6767
bool only_generate;
6868
/// The logic for how a body should be generated
6969
std::unique_ptr<replace_function_bodiest> replace_function_bodies;
70+
71+
replace_function_body_optionst() = delete;
72+
replace_function_body_optionst(const replace_function_body_optionst &) =
73+
delete;
74+
replace_function_bodiest &
75+
operator=(const replace_function_body_optionst &) = delete;
76+
77+
replace_function_body_optionst(
78+
std::regex functions_regex,
79+
bool only_generate,
80+
std::unique_ptr<replace_function_bodiest> replace_function_bodies);
81+
82+
// VS2013 doesn't implement default move constructor/assignment
83+
// Remove if/when we stop caring about VS2013
84+
// https://msdn.microsoft.com/en-us/library/hh567368(v=vs.120).aspx#defaultedanddeleted
85+
replace_function_body_optionst(replace_function_body_optionst &&other);
86+
replace_function_body_optionst &
87+
operator=(replace_function_body_optionst &&other);
7088
};
7189

7290
replace_function_body_optionst parse_replace_function_body_optionst(

0 commit comments

Comments
 (0)