Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

cpp_str() impossible to be used with u8string #63

@patrolez

Description

@patrolez

Hello,
while using object with tiny_utf8::u8string type there is a problem with compilation while cpp_str() and/or cpp_str_bom() is being in use by a code.

Compiler: g++-10, 10.3.0-1ubuntu1~20.04
With -std=c++2a flag.

../../libs/tiny-utf8/include/tinyutf8/tinyutf8.h:3404:46: error: conversion from ‘basic_string<char>’ to non-scalar type ‘basic_string<char8_t>’ requested
 3404 |   std::basic_string<data_type> result = std::string( size() + 3 , ' ' );
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~

std::basic_string<data_type> result = std::string( size() + 3 , ' ' );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions