Depositum irregulare is a Latin phrase that simply means "irregular deposit." It's a concept from ancient Roman contract law that has a very narrow scope and doesn't actually apply to your example. There are two distinct parts to this concept, one dealing with the notion of a deposit and the other with the notion of irregularity. I'll address them both in turn since they're both relevant to the tax issue. I also think that this is an example of the XY problem, since your proposed solution ("give my money to a friend for safekeeping") isn't the right solution to your actual problem ("how can I keep my money safe"). The currency issue is a complication, but it doesn't change the fact that what you're proposing probably isn't a good solution.
The key word in my definition of depositum irregulare is "contract". You don't mention a legally binding contract between you and your friend; an oral contract doesn't qualify because in the event of a breach, it's difficult to enforce the agreement. Legally, there isn't any proof of an oral agreement, and emotionally, taking your friend to court might cost you your friendship. I'm not a lawyer, but I would guess that the absence of a contract implies that even though in the eyes of you and your friend, you're giving him the money for "safekeeping," in the eyes of the law, you're simply giving it to him. In the US, you would owe gift taxes on these funds if they're higher than a certain amount.
In other words, this isn't really a deposit. It's not like a security deposit, in which the money may be held as collateral in exchange for a service, e.g. not trashing your apartment, or a financial deposit, where the money is held in a regulated financial institution like a bank. This isn't a solution to the problem of keeping your money safe because the lack of a contract means you incur additional risk in the form of legal risk that isn't present in the context of actual deposits.
Also, if you don't have an account in the right currency, but your friend does, how are you planning for him to store the money anyway? If you convert your money into his currency, you take on exchange rate risk (unless you hedge, which is another complication). If you don't convert it and simply leave it in his safe, house, car boot, etc. you're still taking on risk because the funds aren't insured in the event of loss.
Furthermore, the money isn't necessarily "safe" with your friend even if you ignore all the risks above. Without a written contract, you have little recourse if a) your friend decides to spend the money and not return it, b) your friend runs into financial trouble and creditors make claim to his assets, or c) you get into financial trouble and creditors make claims to your assets. The idea of giving money to another individual for safekeeping during bankruptcy has been tested in US courts and ruled invalid.
If you do decide to go ahead with a contract and you do want your money back from your friend eventually, you're in essence loaning him money, and this is a different situation with its own complications. Look at this question and this question before loaning money to a friend.
Although this does apply to your situation, it's mostly irrelevant because the "irregular" part of the concept of "irregular deposit" is a standard feature of currencies and other legal tender. It's part of the fungibility of modern currencies and doesn't have anything to do with taxes if you're only giving your friend physical currency. If you're giving him property, other assets, etc. for "safekeeping" it's a different issue entirely, but it's still probably going to be considered a gift or a loan.
You're basically correct about what depositum irregulare means, but I think you're overestimating its reach in modern law. In Roman times, it simply refers to a contract in which two parties made an agreement for the depositor to deposit money or goods with the depositee and "withdraw" equivalent money or goods sometime in the future. Although this is a feature of the modern deposit banking system, it's one small part alongside contract law, deposit insurance, etc. These other parts add complexity, but they also add security and risk mitigation. Your arrangement with your friend is much simpler, but also much riskier.
And yes, there probably are taxes on what you're proposing because you're basically giving or loaning the money to your friend. Even if you say it's not a loan or a gift, the law may still see it that way. The absence of a contract makes this especially important, because you don't have anything speaking in your favor in the event of a legal dispute besides "what you meant the money to be." Furthermore, the money isn't necessarily safe with your friend, and the absence of a contract exacerbates this issue. If you want to keep your money safe, keep it in an account that's covered by deposit insurance. If you don't have an account in that currency, either a) talk to a lawyer who specializes in situation like this and work out a contract, or b) open an account with that currency.
As I've stated, I'm not a lawyer, so none of the above should be interpreted as legal advice. That being said, I'll reiterate again that the concept of depositum irregulare is a concept from ancient Roman law. Trying to apply it within a modern legal system without a contract is a potential recipe for disaster. If you need a legal solution to this problem (not that you do; I think what you're looking for is a bank), talk to a lawyer who understands modern law, since ancient Roman law isn't applicable to and won't pass muster in a modern-day court.