• Paul Reimer's avatar
    Add string view [C++] (#4730) · a0a33d94
    Paul Reimer authored
    * Add view() method on flatbuffers::String, to return a string_view type
    if support for std::string_view (or alternately
    std::experimental::string_view) is found
    
    * Move detection/definition of FLATBUFFERS_STRING_VIEW to base.h, use the
    macro (if it is defined) as the argument type for an overload of CreateString
    
    * Rename String::view() to String::string_view() and use the existing c_str() method for the data pointer
    
    * Add and explain minimum C++ standard version checks for FLATBUFFERS_STRING_VIEW implementations
    
    * Updated preprocessor indenting for FLATBUFFERS_STRING_VIEW
    
    * Convert FLATBUFFERS_STRING_VIEW macro to typedef in flatbuffers:: namespace, and boolean feature toggle macro FLATBUFFERS_HAS_STRING_VIEW
    
    * Prepend flatbuffers:: namespace to disambiguate flatbuffers::string_view typedef from String::string_view()
    
    * clang-format as-she-is-spoke for FLATBUFFERS_HAS_STRING_VIEW
    a0a33d94
Name
Last commit
Last update
.github Loading commit data...
.travis Loading commit data...
CMake Loading commit data...
android Loading commit data...
biicode Loading commit data...
docs Loading commit data...
go Loading commit data...
grpc Loading commit data...
include/flatbuffers Loading commit data...
java/com/google/flatbuffers Loading commit data...
js Loading commit data...
net/FlatBuffers Loading commit data...
php Loading commit data...
python Loading commit data...
reflection Loading commit data...
samples Loading commit data...
src Loading commit data...
tests Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
BUILD Loading commit data...
CMakeLists.txt Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE.txt Loading commit data...
WORKSPACE Loading commit data...
appveyor.yml Loading commit data...
biicode.conf Loading commit data...
composer.json Loading commit data...
conanfile.py Loading commit data...
package.json Loading commit data...
pom.xml Loading commit data...
readme.md Loading commit data...