Coder Social home page Coder Social logo

vittorioromeo / vrm_core Goto Github PK

View Code? Open in Web Editor NEW
34.0 3.0 7.0 620 KB

Lightweight C++14 utility library. (Modernized, stripped and cleaned-up version of SSVUtils.)

Home Page: http://vittorioromeo.info

License: Other

CMake 0.86% C++ 99.07% Shell 0.07%
cpp cpp11 cpp14 library vrm core ssv

vrm_core's Introduction

vrm_core

General-purpose C++17 utility library.

build stability license gratipay badge.cpp on-wandbox on-godbolt

Intended usage (quick start)

  1. Add this repository, SuperV1234/vrm_cmake and SuperV1234/vrm_pp as submodules of your project, as subfolders in your_project/extlibs/:

    git submodule add   https://github.com/SuperV1234/vrm_cmake.git   your_project/extlibs/vrm_cmake
    git submodule add   https://github.com/SuperV1234/vrm_pp.git      your_project/extlibs/vrm_pp
    git submodule add   https://github.com/SuperV1234/vrm_core.git    your_project/extlibs/vrm_core
  2. Include vrm_cmake in your project's CMakeLists.txt and look for the vrm_pp and vrm_core extlibs:

    # Include `vrm_cmake`:
    list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/extlibs/vrm_cmake/cmake/")
    include(vrm_cmake)
    
    # Find `vrm_pp` and `vrm_core`:
    vrm_cmake_find_extlib(vrm_pp)
    vrm_cmake_find_extlib(vrm_core)

(Altenatively, only add vrm_core and vrm_cmake as submodules, and recursively pull submodules to let vrm_core find vrm_pp.)

vrm_core's People

Contributors

vittorioromeo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vrm_core's Issues

FWD implementation

First of all I wanted to say impressive talk today at CPPCon for static_if and static_for -- excellent ideas and implementations. During the talk though I noticed something that might be worth bringing up.

In the implementation of the FWD macro there are a couple of possible errors

Currently it's written as:

#define VRM_CORE_FWD(...) ::std::forward<decltype(__VA_ARGS__)>(__VA_ARGS__)

Unless this std::forward is a custom implementation, there are two things here that may lead to more cryptic errors.

  1. the template type<decltype(__VA_ARGS__)> will only deduce the type of the last arg in the set, because it would expand with the comma operator. For example, decltype(1,1.0) only deduces double and not int,double.
  2. std::forward in the standard only takes one argument, making the __VA_ARGS__ part of this likely unnecessary.

The reason I bring this up is because something like FWD(1,1.0) will essentially translate into a call of:
::std::forward<double>( 1, 1.0 ) -- and this leads to strange compiler messages.
It may be worth changing to just FWD(x) instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.