Comments (6)
Let me do some research first
from hessian2-codec.
https://github.com/wbpcode/hessian2-codec/tree/52e51c4602d64db95b5b7484ca8229254fee6a2f
Checkout this repo and commit and run:
bazel build //example/mutiple_src:mutiple_src
It will be multiple definition error.
And checkout to 7ab8660, run above command again, it will be ok. (7ab8660 moved function definition to .cc)
from hessian2-codec.
If a function template specialization specifies all template parameters, then it is a normal function, not a template. The declaration and implementation should be separated in this case to avoid redefinition errors.
from hessian2-codec.
@wbpcode You're right. That seems to be the reason.
https://stackoverflow.com/questions/4445654/multiple-definition-of-template-specialization-when-using-different-objects
from hessian2-codec.
I I have completed a version in which the definitions of related functions have been moved to the cc file. Of course, directly declaring related functions as inline can also solve this problem. If you prefer the former, I can submit a PR directly. If you prefer the latter, May be I can take the time to prepare another PR tomorrow to solve this problem.
from hessian2-codec.
@wbpcode The former is better, and separating implementation and declaration is a best practice.
from hessian2-codec.
Related Issues (11)
- / HOT 1
- Use Protobuf message replace Object and implement all hessian type HOT 2
- List.of() is not supported when the method argument type is java.util.list. HOT 1
- optimize debug string to Json
- Integrated google oss-fuzz
- string encoding/decoding is imcompatible with dubbo-hessian-lite for four char > 0xFFFF HOT 3
- The hessian2 specification has some errors and also some details not explained HOT 2
- replace std::optional<T*> to std::optional<std::reference_wrapper<T>> HOT 3
- Unified naming convention HOT 2
- Performance of String decoding HOT 2
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 hessian2-codec.