libcmd: drop non-default ctors virtual inheritance
it's a trap. it's always a trap. non-default ctors of virtual base
classes must be called with the same parameters every time or very
surprising things will happen. good luck if you virtually derive a
class more than once with different ctor arguments. that'll break.
Change-Id: I1345963e69e98f37c3cbd070bae164d89eade455
This commit is contained in:
parent
ac74dc3a2b
commit
c4a077d0b8
|
@ -227,7 +227,7 @@ protected:
|
|||
|
||||
public:
|
||||
|
||||
BuiltPathsCommand(bool recursive = false);
|
||||
BuiltPathsCommand(bool recursive);
|
||||
|
||||
virtual void run(ref<Store> store, BuiltPaths && paths) = 0;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
using namespace nix;
|
||||
|
||||
struct CmdCopy : virtual CopyCommand, virtual BuiltPathsCommand
|
||||
struct CmdCopy : virtual CopyCommand, BuiltPathsCommand
|
||||
{
|
||||
CheckSigsFlag checkSigs = CheckSigs;
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ static auto rCmdRealisation = registerCommand<CmdRealisation>("realisation");
|
|||
|
||||
struct CmdRealisationInfo : BuiltPathsCommand, MixJSON
|
||||
{
|
||||
CmdRealisationInfo() : BuiltPathsCommand(false) {}
|
||||
|
||||
std::string description() override
|
||||
{
|
||||
return "query information about one or several realisations";
|
||||
|
|
Loading…
Reference in a new issue