Comments (11)
I got compiler errors, seems like the llvm.org clang 3.5.0-1~exp1 version is incomplete. I'll try Debian Jessie with different clang++ 3.5 package later.
$ CXX=clang++ CC=clang make -j1 test
make -C ./tests/ test
make[1]: Entering directory `/home/patrik/work/sklik/SuperiorMySqlpp/tests'
clang++ -std=c++1y -pedantic-errors -Wall -Wextra -Wswitch-enum -Wnarrowing -DHAVE_CLANG -Werror -fPIC -fsanitize=address -fsanitize=leak -fsanitize=undefined -g3 -I../include/ -I../third_party/bandit/ -DDEBUG -O0 -c -MMD -o converters/converters.o converters/converters.cpp
In file included from converters/converters.cpp:8:
In file included from ../include/superior_mysqlpp/converters.hpp:10:
../include/superior_mysqlpp/converters/to_integer.hpp:253:17: error: no template named 'enable_if_t' in namespace 'std'; did you mean 'enable_if'?
inline std::enable_if_t<std::is_unsigned<T>::value, T> toInteger(const char* str, unsigned int length)
~~~~~^~~~~~~~~~~
enable_if
from superiormysqlpp.
With
$ clang++-3.5 --version
Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
I get simillar error you reported:
$ CXX=clang++-3.5 CC=clang-3.5 make -j1 test
make -C ./tests/ test
make[1]: Entering directory '/home/patrik/work/sklik/SuperiorMySqlpp/tests'
clang++-3.5 -std=c++14 -pedantic-errors -Wall -Wextra -Wswitch-enum -Wnarrowing -DHAVE_CLANG -Werror -fPIC -fsanitize=address -fsanitize=leak -fsanitize=undefined -g3 -I../include/ -I../third_party/bandit/ -DDEBUG -O0 -c -MMD -o converters/converters.o converters/converters.cpp
In file included from converters/converters.cpp:8:
In file included from ../include/superior_mysqlpp/converters.hpp:11:
../include/superior_mysqlpp/converters/to_floating_point.hpp:27:18: error: inline declaration of 'toFloatingPoint<float>' follows non-inline definition
inline float toFloatingPoint(const char* str, std::size_t length)
^
../include/superior_mysqlpp/converters/to_floating_point.hpp:27:18: note: previous definition is here
../include/superior_mysqlpp/converters/to_floating_point.hpp:37:19: error: inline declaration of 'toFloatingPoint<double>' follows non-inline definition
inline double toFloatingPoint(const char* str, std::size_t length)
^
../include/superior_mysqlpp/converters/to_floating_point.hpp:37:19: note: previous definition is here
../include/superior_mysqlpp/converters/to_floating_point.hpp:47:24: error: inline declaration of 'toFloatingPoint<long double>' follows non-inline definition
inline long double toFloatingPoint(const char* str, std::size_t length)
^
../include/superior_mysqlpp/converters/to_floating_point.hpp:47:24: note: previous definition is here
3 errors generated.
makefile:101: recipe for target 'converters/converters.o' failed
But it doesn't make sense to me. I need more time.
from superiormysqlpp.
from superiormysqlpp.
According to clang C++ support page, Clang 3.4 and later impolement all of the ISO C++ 2014 standard.
Of course, I compiled with the appropriate flag to ensure c++14 was enabled.
I hope you can fix this because e.g., debian stable distros come with an old clang package.
from superiormysqlpp.
I tried compiling the library itself using:
Debian clang version 3.5.0-1~exp1 (trunk) (based on LLVM 3.5.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
from
$ apt-cache policy clang-3.5
clang-3.5:
Installed: 1:3.5~svn212963-1~exp1
Candidate: 1:3.5~svn212963-1~exp1
Version table:
*** 1:3.5~svn212963-1~exp1 0
500 http://llvm.org/apt/wheezy/ llvm-toolchain-wheezy/main amd64 Packages
100 /var/lib/dpkg/status
And it fails on
error: invalid value 'c++14' in '-std=c++14'
So it seems, that clang 3.5.x
doesn't support required C++14 or the precompiled packages provided by llvm.org are from some really old branch.
from superiormysqlpp.
Are you sure you're compiling using clang++
and not clang
by mistake?
I'm compiling with:
Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
Target: i386-pc-linux-gnu
Thread model: posix
and the flag -std=c++14
is correctly supported. Exactly as indicated in this page:
https://clang.llvm.org/cxx_status.html
C++14 implementation status
Clang 3.4 and later implement all of the ISO C++ 2014 standard.
You can use Clang in C++14 mode with the -std=c++14 option (use -std=c++1y in Clang 3.4 and earlier).
from superiormysqlpp.
This is what I get:
$ clang++ -std=c++14 tests/uncaught_exception_counter.cpp
error: invalid value 'c++14' in '-std=c++14'
$ clang++ --version
Debian clang version 3.5.0-1~exp1 (trunk) (based on LLVM 3.5.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
from superiormysqlpp.
I think the version 3.5.0-1~exp1 (trunk)
is not tagged in the repository, maybe has got some issue with the flag.
Could you please try with -std=c++1y
, instead? It should be the same that -std=c++14
.
Thanks
from superiormysqlpp.
Thanks. I'll try to help in my (few) spare time
from superiormysqlpp.
I finally found something but it's not a good news: Specialized template function with deleted “general” case fails to compile with g++ <=4.8.0 and clang++
Looks like the clang++ << 3.9.0 implemented C++14 draft, that was later polished so later versions of clang accept current source. I'm affraid this won't be fixed.
from superiormysqlpp.
Thanks anyway.
At least I learned that clang I'm using has not got that feature :-)
I'll try to install a more recent version of clang: I read that multiple version can cohexist on Debian so I hope it won't be a big deal.
Thanks again.
from superiormysqlpp.
Related Issues (20)
- Inconsistency in server options
- MSVC14 - string_view HOT 3
- Problem with `cout << row;`
- Incorrect size passed to memset while clearing params/resultsBinding vectors HOT 3
- Noexcept function should not throw an exception HOT 1
- Incorrect functions called to get error info when mysql_stmt_close fails
- Default logger should also log errors to std::cerr
- Missing feature: affectedRows method for prepared statements
- makeHexString suitable for std::string
- DBDriver::Result::freeResult() is useless HOT 1
- Propagate return value of mysql_row_seek and mysql_stmt_row_seek
- mysql_sqlstate
- DBDriver - many methods can be noexcept
- How to use this client with multi master mode of MySQL with Galera cluster enabled HOT 1
- Full logger implementation uses noexcept for methods that can throw exceptions HOT 3
- RowStreamAdapter should support non-default-constructible types HOT 1
- Make user-defined converters include-order independent
- Linker error with gcc 10 and multiple translation units including superior_mysqlpp.hpp HOT 1
- an cmake issue HOT 4
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 superiormysqlpp.