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

Common structure of base libraries #44

Open
deniskoronchik opened this issue Oct 15, 2019 · 2 comments
Open

Common structure of base libraries #44

deniskoronchik opened this issue Oct 15, 2019 · 2 comments

Comments

@deniskoronchik
Copy link
Contributor

deniskoronchik commented Oct 15, 2019

Right now mapbox-base is a set of small submodules. That makes hard to support consistency between each small repo. Maybe we should place all these files in one repo? Like a std library.

As example, in VisionSDK we want to use optional and variant from mapbox-base and have a troubles:

  • optional class is placed inside std::experimental namespace, but variant places in mapbox::util one.
  • optional package have different structure from variant. variant have include/mapbox folder that allow me to add include folder to include_directories and use #include "mapbox/variant.hpp". But i can't do the same with optional. Because optional.hpp placed directly inside optional submodule directory
@brunoabinader
Copy link
Member

Hi @deniskoronchik, I think what you're asking is the same that @pozdnyakov have been discussing: a single include header that contains aliases to the external header-only dependencies, something like this:

#include <external/optional.hpp>

namespace mapbox {
namespace base {

using optional = external::optional;

} // namespace base
} // namespace mapbox

@chenzunfeng
Copy link

chenzunfeng commented May 6, 2021

Hi, I'm reading source code of mapbox-gl-native. Can anyone tell me what's the difference between mapbox::base::WeakPtr and std::weak_ptr? Are there any advantages of mapbox::base::WeakPtr over std::weak_ptr?

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

No branches or pull requests

3 participants