Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.
/ dump Public archive
generated from bemanproject/exemplar

std::dump that prints its arguments space-separated with a new-line

License

Notifications You must be signed in to change notification settings

bemanproject/dump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

beman.dump: A tool for dumping an object's value to standard output

Continuous Integration Tests

beman::dump::dump() prints its arguments space-separated with a new-line. This is useful as a debugging utility. A call to beman::dump::dump(arg1, arg2, …, argn) is equivalent to std::println(“{} {} … {}”, arg1, arg2, …, argn)

Implements: Proposal of std::dump (P2879R0)

Status: Retired. No longer maintained or actively developed.

Building beman.dump

Usage

TODO

Dependencies

This project has no C or C++ dependencies.

Build-time dependencies:

  • cmake
  • ninja, make, or another CMake-supported build system
    • CMake defaults to "Unix Makefiles" on POSIX systems

How to install dependencies

Dependencies install example on Ubuntu 24.04
# Install tools:
apt-get install -y cmake make ninja-build

# Toolchains:
apt-get install                           \
  g++-14 gcc-14 gcc-13 g++-14             \
  clang-18 clang++-18 clang-17 clang++-17
Dependencies install example on MAC OS $VERSION
# TODO
Dependencies install example on Windows $VERSION
# TODO

How to build beman.dump

This project strives to be as normal and simple a CMake project as possible. This build workflow in particular will work, producing a static libbeman.dump.a library, ready to package with its headers:

cmake -B build -S .
cmake --build build
ctest --test-dir build
cmake --install build --prefix /opt/beman.dump

Integrate beman.dump into your project

Use beman.dump directly from C++

If you want to use beman.dump from your project, you can include beman/dump/*.hpp files from your C++ source files

#include <beman/dump/dump.hpp>

and directly link with libbeman.dump.a

# Assume /opt/beman.dump staging directory.
$ c++ -o basic examples/basic.cpp \
    -I /opt/beman.dump/include/ \
    -L/opt/beman.dump/lib/ -lbeman.dump
Use beman.dump directly from CMake

For CMake based projects, you will need to use the beman.dump CMake module to define the beman::dump CMake target:

find_package(beman.dump REQUIRED)

You will also need to add beman::dump to the link libraries of any libraries or executables that include beman/dump/*.hpp in their source or header file.

target_link_libraries(yourlib PUBLIC beman::dump)
Use beman.dump from other build systems

Build systems that support pkg-config by providing a beman.dump.pc file. Build systems that support interoperation via pkg-config should be able to detect beman.dump for you automatically.

Contributing

Please do! Issues and pull requests are appreciated.

About

std::dump that prints its arguments space-separated with a new-line

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •