Comments (12)
I guess it is fixed since 2b1521b.
You should try latest release version
from utfcpp.
Yeah, I am using the latest release version, 3.2.2. Although I'm not home at the moment to work on my code, so I can't double check right now if maybe it was some random cache issue because of CMake (I forgot to push the latest changes before leaving for the holiday, heh). I'll be back on Friday/Saturday and get back to you.
from utfcpp.
Sorry for the late reply. I double checked with a clean build and everything. It still produces the warning. It's not exactly a big deal, but it is annoying it keeps popping up.
from utfcpp.
You definitely don't have the latest version. unchecked.h:179 that causes the problem in your code looks like:
class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
That code does not exist anymore. Here is that line in the current version: https://github.com/nemtrif/utfcpp/blob/master/source/utf8/unchecked.h#L179
And here is the current declaration of the iterator type:
https://github.com/nemtrif/utfcpp/blob/master/source/utf8/unchecked.h#L218
from utfcpp.
I mean, I downloaded the latest release and replaced the files. You can confirm that here. I have no idea what I can tell you otherwise.
from utfcpp.
So, you mixed up your on cocktail of the lib? In that case, the issue should be moved to the cocktail. It is definitely fixed here.
from utfcpp.
I'm not sure what you mean, honestly. I didn't modify the source code from the downloaded release.
from utfcpp.
I just looked at https://github.com/nemtrif/utfcpp/archive/refs/tags/v3.2.2.zip and it is fine. What download exactly do you use?
from utfcpp.
I have downloaded that exact same zip file.
from utfcpp.
Can you extract that file into a new directory, open file unchecked.h and look for the line that causes the warning:
class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
from utfcpp.
this is the class within unchecked.h:
// The iterator class
template <typename octet_iterator>
class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
octet_iterator it;
public:
iterator () {}
explicit iterator (const octet_iterator& octet_it): it(octet_it) {}
// the default "big three" are OK
octet_iterator base () const { return it; }
uint32_t operator * () const
{
octet_iterator temp = it;
return utf8::unchecked::next(temp);
}
bool operator == (const iterator& rhs) const
{
return (it == rhs.it);
}
bool operator != (const iterator& rhs) const
{
return !(operator == (rhs));
}
iterator& operator ++ ()
{
::std::advance(it, utf8::internal::sequence_length(it));
return *this;
}
iterator operator ++ (int)
{
iterator temp = *this;
::std::advance(it, utf8::internal::sequence_length(it));
return temp;
}
iterator& operator -- ()
{
utf8::unchecked::prior(it);
return *this;
}
iterator operator -- (int)
{
iterator temp = *this;
utf8::unchecked::prior(it);
return temp;
}
}; // class iterator
and the #define version is UTF8_FOR_CPP_UNCHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731
from utfcpp.
Long story short you have an old version of the code. I just looked at your repository and it is obvious. You don't even have all the files from recent releases: compare: https://github.com/lovebrew/lovepotion/tree/dev/3.0/libraries/utf8/utf8 to https://github.com/nemtrif/utfcpp/tree/master/source/utf8.
Or compare https://github.com/nemtrif/utfcpp/blob/master/source/utf8/core.h to https://github.com/lovebrew/lovepotion/blob/dev/3.0/libraries/utf8/utf8/core.h
You are obviously missing this part:
`// Determine the C++ standard version.
// If the user defines UTF_CPP_CPLUSPLUS, use that.
// Otherwise, trust the unreliable predefined macro __cplusplus
#if !defined UTF_CPP_CPLUSPLUS
#define UTF_CPP_CPLUSPLUS __cplusplus
#endif
#if UTF_CPP_CPLUSPLUS >= 201103L // C++ 11 or later
#define UTF_CPP_OVERRIDE override
#define UTF_CPP_NOEXCEPT noexcept
#else // C++ 98/03
#define UTF_CPP_OVERRIDE
#define UTF_CPP_NOEXCEPT throw()
#endif // C++ 11 or later
`
from utfcpp.
Related Issues (20)
- Unreachable code HOT 2
- The library is not working properly
- Bumping CMake required version HOT 5
- cmake dependency totally broken HOT 5
- vs2022 C2676 is appearing HOT 5
- Install CMake files to arch-indep directories when ARCH_INDEPENDENT is set HOT 3
- Missing ftest.h HOT 3
- utf8::utf16to8 and utf8::unchecked::utf16to8 produce different output HOT 2
- After 4.0.0 headers gets installed into include/utf8 using CMake HOT 7
- Strings are one character short with version 3.2.5 through 4.0.0 HOT 4
- Recommended way to convert case HOT 1
- mismatch version number in CMakeLists.txt HOT 1
- CMake could be added to documentation HOT 1
- Warnings from -Wsign-conversion on Gcc 11.4.0 with C++ 20 HOT 3
- Missing `export` CMake command when installing
- FTBFS due to undocumented external dependency HOT 2
- Support for u8string? HOT 3
- Utf16 strings codepoint iteration and appending HOT 4
- Clang 10 Compiler warnings HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from utfcpp.