Giter Site home page Giter Site logo

fengbingchun / messy_test Goto Github PK

View Code? Open in Web Editor NEW
303.0 303.0 176.0 27.31 MB

C++/C++11/C++14/C++17/C++20's usage

Home Page: http://blog.csdn.net/fengbingchun/article/category/725584

C++ 60.70% C 21.20% Batchfile 0.03% Inno Setup 0.14% CMake 0.83% Makefile 0.70% M4 0.71% Python 4.44% Shell 2.43% Ruby 0.81% CSS 0.24% HTML 6.18% Dockerfile 0.01% JavaScript 0.28% Lua 0.01% Perl 1.10% XSLT 0.01% Awk 0.02% Starlark 0.17% SCSS 0.02%

messy_test's Introduction

messy_test's People

Contributors

fengbingchun 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

messy_test's Issues

Ubuntu上编译出错

博主你好,我尝试在Ubuntu18.04下编译linux_cmake_CppBaseTest,结果发现编译出错了,似乎是因为编译选项添加有问题,导致没有识别出C++11及以上版本,博主能否帮忙看一下?
这是错误信息:
/home/lhh/Documents/learning/coding/Messy_Test/demo/CppBaseTest/effective_modern_cplusplus.cpp: In member function ‘double effective_modern_cplusplus_::Point16::distanceFromOrigin() const’:
/home/lhh/Documents/learning/coding/Messy_Test/demo/CppBaseTest/effective_modern_cplusplus.cpp:633:15: error: ‘sqrt’ is not a member of ‘std’
return std::sqrt((xx) + (yy));
^~~~
/home/lhh/Documents/learning/coding/Messy_Test/demo/CppBaseTest/effective_modern_cplusplus.cpp:633:15: note: suggested alternative: ‘sort’
return std::sqrt((xx) + (yy));

/home/lhh/Documents/learning/coding/Messy_Test/demo/CppBaseTest/effective_modern_cplusplus.cpp: In function ‘int effective_modern_cplusplus_::test_item_32()’:
/home/lhh/Documents/learning/coding/Messy_Test/demo/CppBaseTest/effective_modern_cplusplus.cpp:1244:20: error: ‘bind’ is not a member of ‘std’
auto func7 = std::bind([](const std::unique_ptr& pw) {return pw->isValidated() && pw->isArchived(); }, std::make_unique()); // C++11
^~~~
/home/lhh/Documents/learning/coding/Messy_Test/demo/CppBaseTest/effective_modern_cplusplus.cpp:1244:20: note: suggested alternative: ‘find’
auto func7 = std::bind([](const std::unique_ptr& pw) {return pw->isValidated() && pw->isArchived(); }, std::make_unique()); // C++11

Fixed compilation failure in Linux environment

Failed to build CppBaseTest due to some definition missing, fixed by the below patch. Please help review.

diff --git a/demo/CppBaseTest/effective_modern_cplusplus.cpp b/demo/CppBaseTest/effective_modern_cplusplus.cpp
index 07c3e04..2dbf41d 100644
--- a/demo/CppBaseTest/effective_modern_cplusplus.cpp
+++ b/demo/CppBaseTest/effective_modern_cplusplus.cpp
@@ -1,6 +1,8 @@
 #include "effective_modern_cplusplus.hpp"
 #include <cstddef>
 #include <cstdint>
+#include <cmath>
+#include <functional>
 #include <iostream>
 #include <array>
 #include <vector>
diff --git a/demo/CppBaseTest/set.cpp b/demo/CppBaseTest/set.cpp
index a0ee1f1..1749cc0 100644
--- a/demo/CppBaseTest/set.cpp
+++ b/demo/CppBaseTest/set.cpp
@@ -7,6 +7,7 @@
 #include <functional>
 #include <iomanip>
 #include <algorithm>
+#include <cmath>
 
 // Blog: http://blog.csdn.net/fengbingchun/article/details/63268962

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.