Skip to content

Commit

Permalink
Merge pull request #277 from oldoldtea/fix-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ToruNiina authored Sep 30, 2024
2 parents d050c6b + 5445905 commit f925e7f
Showing 1 changed file with 33 additions and 16 deletions.
49 changes: 33 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ toml11 is a feature-rich TOML language library for C++11/14/17/20.

## Example

```toml
# example.toml
title = "an example toml file"
nums = [3, 1, 4, 1, 5] # pi!
```

```cpp
#include <toml.hpp>
#include <iostream>

// ```toml
// title = "an example toml file"
// nums = [3, 1, 4, 1, 5] # pi!
// ```

int main()
{
// select TOML version at runtime (optional)
Expand All @@ -50,7 +51,7 @@ int main()
}
if(data.at("nums").is_array())
{
data.push_back(9);
data["nums"].as_array().push_back(9);
}

// check comments
Expand All @@ -70,20 +71,36 @@ int main()
}
```


For more details, please refer to the [documentation](https://toruniina.github.io/toml11/).

## Table of Contents

- [Integration](#integration)
- [Features](#features)
- [parsing a file](#parsing-a-file)
- [finding a value](#finding-a-value)
- [comments](#comments)
- [error messages](#error-messages)
- [serialization](#serialization)
- [Breaking Changes from v3](#changes-from-v3)
- [Contributors](#contributors)
- [Licensing Terms](#licensing-terms)
- [toml11](#toml11)
- [Example](#example)
- [Table of Contents](#table-of-contents)
- [Integration](#integration)
- [Single Include File](#single-include-file)
- [git submodule](#git-submodule)
- [CMake `FetchContent`](#cmake-fetchcontent)
- [CMake Package Manager (CPM)](#cmake-package-manager-cpm)
- [Install Using CMake](#install-using-cmake)
- [Precompile Library](#precompile-library)
- [Building Example](#building-example)
- [Building Tests](#building-tests)
- [Features](#features)
- [Parsing a File](#parsing-a-file)
- [finding a value](#finding-a-value)
- [comments](#comments)
- [error messages](#error-messages)
- [serialization](#serialization)
- [Configuring Types](#configuring-types)
- [Examples](#examples)
- [Changes from v3](#changes-from-v3)
- [Breaking Changes](#breaking-changes)
- [Added features](#added-features)
- [Contributors](#contributors)
- [Licensing terms](#licensing-terms)

## Integration

Expand Down

0 comments on commit f925e7f

Please sign in to comment.