Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkpoint2 #2

Open
wants to merge 42 commits into
base: checkpoint1
Choose a base branch
from
Open

Checkpoint2 #2

wants to merge 42 commits into from

Conversation

rnburn
Copy link
Owner

@rnburn rnburn commented Jun 16, 2017

  • Sets up constructors on the Value type to avoid undesirable implicit conversions such as Value(123) being a bool type.
  • Sets up versioning.
  • Adds a logging API.
  • Adds a Close method to Tracer.
  • Fixes issues with time specification.
  • Adds std::error_code's for propagation errors.

rnburn added 30 commits June 9, 2017 19:55
@@ -3,4 +3,16 @@ enable_testing()

project(opentracing-cpp)

set(OPENTRACING_ABI_VERSION "1")
Copy link

Choose a reason for hiding this comment

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

Are "set" and "SET" the same?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes, cmake commands aren't case sensitive. I was also considering maybe setting the abi version from the major and minor versions.

@@ -1,6 +1,12 @@
#ifndef OPENTRACING_STRINGREF_H
Copy link

Choose a reason for hiding this comment

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

Would you be open to something more like the C++17 string_view in terms of the API names?

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3921.html

Copy link
Owner Author

Choose a reason for hiding this comment

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

Sure. I just copied it from Bloomberg's PR. Another option might be to use the string_span from the GSL library or a C++11 version of GSL.

Copy link
Owner Author

@rnburn rnburn Jun 22, 2017

Choose a reason for hiding this comment

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

I removed the API functions that std::string_view doesn't have and added a few of the ones from std::string_view that are easy enough to implement. The only exceptions are the constructor taking std::string and operator std::string, which std::string_view doesn't need because std::string has those implicit conversions, so it should be possible to swap it out for std::string_view at some point in the future without breaking much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants