TreeMutator: better invoke the Builder-ctor explicitly
...by relying on an implicit conversion, the code does not become simpler, just shorter, and even more confusing :-/
This commit is contained in:
parent
d8b20ae497
commit
d8e0ad179b
2 changed files with 4 additions and 2 deletions
|
|
@ -128,7 +128,8 @@ namespace diff{
|
|||
inline Builder<ObjectTypeHandler<MUT>>
|
||||
filterObjectTypeAttribute (Rec::Mutator& targetTree, Builder<MUT>&& chain)
|
||||
{
|
||||
return ObjectTypeHandler<MUT> {targetTree, move(chain)};
|
||||
using ObTyHa = ObjectTypeHandler<MUT>;
|
||||
return Builder<ObTyHa>{ObTyHa {targetTree, move(chain)}};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -316,6 +316,7 @@ namespace diff{
|
|||
struct Builder
|
||||
: PAR
|
||||
{
|
||||
explicit
|
||||
Builder(PAR&& par)
|
||||
: PAR{forward<PAR> (par)}
|
||||
{ }
|
||||
|
|
@ -469,7 +470,7 @@ namespace diff{
|
|||
inline Builder<TreeMutator>
|
||||
TreeMutator::build ()
|
||||
{
|
||||
return TreeMutator();
|
||||
return Builder<TreeMutator>{TreeMutator()};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue