C++ implementation of depth-first search
What further improvements can I make to this code?

The code is rather bad - the site you read it from tends to have lots of bad/amateur articles.

The graph class:
std::map&lt;int, bool&gt; visited;
std::map&lt;int, std::list&lt;int&gt;&gt; adj;



This is extremely poor and inefficient graph implementation. std::map creates a new memory allocation for each element. So you do it twice for both the boolean and the list. Also std::list allocates a piece of memory for each element as well.
Overuse of memory allocation means both memory fragmentation issues as well as performance issues due lots of unmanageable RAM access and indirections. Memory loading is currently one of the slowest operations on modern processors. But compilers tend to optimize it quite well if the memory is contiguous - which is furthest from the truth in this case.
To simplify the structure you'd better use std::vector&lt;Node&gt; where Node contains vertex's information + std::vector&lt;size_t&gt; of neighbors. In general, I don't believe there is a perfect solution for graph representation - instead there are numerous ways to represent and each suitable or more attuned to specific types of graphs. For instance, solutions that are good for sparse graphs are surely very poorly suited for dense graphs. Also certain additional optimizations can be made assuming that graph is fixes. The question is complex and I cannot provide an answer without knowledge of the use-case.

DFS() implementation is also pretty bad. It relies on recursion and I assure you, that for large enough connected graphs with it will blow the stack resulting in UB.

Proper DFS/BFS implementation store states-to-be-visited in a std::stack or std::queue or something similar while the visit routine occurs in a single loop instead of recursion.
Also, I presume you want some kind of output or action made on vertices from the DFS, no?