@gollum,
Yes: is the short answer.
All countries which have a form of accepted constitution with at least some basis in accepted laws for that nation plus armed services .... have the ability to impose martial law or whatever they wish to call it. A country like the UK for example has no written constitution as such, it is an amalgam of accepted practices compiled through history since the Magna Carta came into existence in the 1215.
However, it is not quite as simple as Trump might like to imagine. Just because some power deranged elected idiot shouts they want martial law, that does not mean it necessarily comes to pass.
The military are almost without fail sworn
to defend the country. It is
extremely unusual to have the situation which Hitler created after several years of power.
Following the death of Hindenburg, a referendum was held asking if he (Hitler) should be both chancellor and president ..... 97% said 'yes' and it is believed that result was less 'fixed' than one might imagine. At that point in 1937, the NSDAP have created an apparent economic miracle (with smoke & mirrors) and had restored some self respect to Germany.
Then Hitler annexed Austria without a shot fired and so was seen as
the saviour of Germany .... At which point he had enough social and political power to persuade the German armed services plus the civil service to renounce their allegiance to the country ..... Instead swearing the
'Führereid', in English 'The Hitler oath' where they swore their total allegiance/service to Hitler
personally.
Trump has not done that and one has to suspect that Martial Law would not be popular with the US Army ... They do not want to be up against their own civilians and the joint chiefs will know that it is would not be good for either the country nor the people. Leaders of armed services are not party political and have little time for politics.
Ergo, if you have a nuclear strike from China as the coming S China Sea war erupts ... sure, then you will 100% get martial law and people shot for looting food.
However, Martial law because your paranoid narcissist, schizoid, mentally ill, totally deranged president loses the election?
Somehow that I really doubt it.