Skip to content

sv1990/dbg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DBG

A rust-like DBG macro

This library simplifes quick debug printing by providing the DBG which can printt any type from the standard library and also user defined ranges. The library requires C++20 since it uses concepts for overload resolution.

Example

#include "dbg/dbg.hh"
std::map<std::string, int> m{{"foo", 1}, {"bar", 2}};
DBG(m);

This prints

../example/example.cc(8): m = [(bar, 2), (foo, 1)]

Apart from the concept of the map, DBG prints also the filename, the line and the variable name.

About

A Rust-like DBG macro

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published