Skip to content
This repository was archived by the owner on Jul 2, 2022. It is now read-only.

Add Tuparg - semi-typesafe fast variadic argument iteration support #9

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

dekrain
Copy link
Collaborator

@dekrain dekrain commented Dec 6, 2020

Status: Work in progresss

@dekrain dekrain requested a review from Unicode-Hater January 5, 2021 23:11
@Unicode-Hater
Copy link
Collaborator

What's the situation of the draft?

Copy link
Collaborator

@Unicode-Hater Unicode-Hater left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work

@@ -0,0 +1,19 @@
#include <Printf.hpp>

#include <random>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should checkout hsd::random

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but hsd doesn't have random_device

@dekrain
Copy link
Collaborator Author

dekrain commented Jan 6, 2021

TODO: Typecheck individual types for xvprintf

@@ -10,7 +10,7 @@ namespace hsd {
void* addr;

template <typename X>
X& getnext() {
X& getnext_unsafe() {
assert(addr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if addr is nullptr that you really need to use an assert?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more of a safety measure. The program normally shouldn't allow this function to be called with null pointer, but if it gets called (by some other way than getnext), then it's a debugging check, and it should be erased when compiling for release

@Unicode-Hater Unicode-Hater added the enhancement New feature or request label Feb 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants