Definition of template class member function specialization doesn't emit symbol unless its unspecialized...
I'm reposting this problem, which I also encountered with Windows10, Visual Studio 2015.
Could someone tell me the recent progress of it?
Look at the following example. https://godbolt.org/g/wUavhy It seems
like for every compiler except Visual Studio it doesn't matter if
unspecialized function definition is outside or inside class. But MSVC
emits symbol for specialization only for variant with #define
INNER_DEFINITION 0. And for me it seems like it shouldn't matter too.
Since this issue results in a linker error it may be quite
counter-inutive to a programmer.
c++ templates template-specialization
|
show 1 more comment
I'm reposting this problem, which I also encountered with Windows10, Visual Studio 2015.
Could someone tell me the recent progress of it?
Look at the following example. https://godbolt.org/g/wUavhy It seems
like for every compiler except Visual Studio it doesn't matter if
unspecialized function definition is outside or inside class. But MSVC
emits symbol for specialization only for variant with #define
INNER_DEFINITION 0. And for me it seems like it shouldn't matter too.
Since this issue results in a linker error it may be quite
counter-inutive to a programmer.
c++ templates template-specialization
1
Looks like MSVC bug to me. I imagine, you have unresolved symbols linker error in real life?
– SergeyA
Dec 28 '18 at 16:36
yes @SergeyA, I'm trying porting this repo to Windows: github.com/zhangxaochen/surfelmeshing, which produces the same error (I think so)... currently I have to move the non-specialized function body outside the class as a workaround, but wondering if there is a standard solution.
– zhangxaochen
Dec 28 '18 at 16:44
You might try to submit bugreport to MSFT? As an alternative, you might use a non-MSVC compiler for Windows - gcc (through MinGW) or CLang.
– SergeyA
Dec 28 '18 at 16:48
4
I'm voting to close this question as off-topic because it's a question for the MS support team about how they progressed with their bugfixes.
– Johannes Schaub - litb
Dec 28 '18 at 16:56
@SergeyA yes gcc should work, but I'm just curious... is inlining the specialized member functions a good way?
– zhangxaochen
Dec 28 '18 at 17:17
|
show 1 more comment
I'm reposting this problem, which I also encountered with Windows10, Visual Studio 2015.
Could someone tell me the recent progress of it?
Look at the following example. https://godbolt.org/g/wUavhy It seems
like for every compiler except Visual Studio it doesn't matter if
unspecialized function definition is outside or inside class. But MSVC
emits symbol for specialization only for variant with #define
INNER_DEFINITION 0. And for me it seems like it shouldn't matter too.
Since this issue results in a linker error it may be quite
counter-inutive to a programmer.
c++ templates template-specialization
I'm reposting this problem, which I also encountered with Windows10, Visual Studio 2015.
Could someone tell me the recent progress of it?
Look at the following example. https://godbolt.org/g/wUavhy It seems
like for every compiler except Visual Studio it doesn't matter if
unspecialized function definition is outside or inside class. But MSVC
emits symbol for specialization only for variant with #define
INNER_DEFINITION 0. And for me it seems like it shouldn't matter too.
Since this issue results in a linker error it may be quite
counter-inutive to a programmer.
c++ templates template-specialization
c++ templates template-specialization
edited Dec 28 '18 at 16:42
zhangxaochen
asked Dec 28 '18 at 16:23
zhangxaochenzhangxaochen
14.9k43452
14.9k43452
1
Looks like MSVC bug to me. I imagine, you have unresolved symbols linker error in real life?
– SergeyA
Dec 28 '18 at 16:36
yes @SergeyA, I'm trying porting this repo to Windows: github.com/zhangxaochen/surfelmeshing, which produces the same error (I think so)... currently I have to move the non-specialized function body outside the class as a workaround, but wondering if there is a standard solution.
– zhangxaochen
Dec 28 '18 at 16:44
You might try to submit bugreport to MSFT? As an alternative, you might use a non-MSVC compiler for Windows - gcc (through MinGW) or CLang.
– SergeyA
Dec 28 '18 at 16:48
4
I'm voting to close this question as off-topic because it's a question for the MS support team about how they progressed with their bugfixes.
– Johannes Schaub - litb
Dec 28 '18 at 16:56
@SergeyA yes gcc should work, but I'm just curious... is inlining the specialized member functions a good way?
– zhangxaochen
Dec 28 '18 at 17:17
|
show 1 more comment
1
Looks like MSVC bug to me. I imagine, you have unresolved symbols linker error in real life?
– SergeyA
Dec 28 '18 at 16:36
yes @SergeyA, I'm trying porting this repo to Windows: github.com/zhangxaochen/surfelmeshing, which produces the same error (I think so)... currently I have to move the non-specialized function body outside the class as a workaround, but wondering if there is a standard solution.
– zhangxaochen
Dec 28 '18 at 16:44
You might try to submit bugreport to MSFT? As an alternative, you might use a non-MSVC compiler for Windows - gcc (through MinGW) or CLang.
– SergeyA
Dec 28 '18 at 16:48
4
I'm voting to close this question as off-topic because it's a question for the MS support team about how they progressed with their bugfixes.
– Johannes Schaub - litb
Dec 28 '18 at 16:56
@SergeyA yes gcc should work, but I'm just curious... is inlining the specialized member functions a good way?
– zhangxaochen
Dec 28 '18 at 17:17
1
1
Looks like MSVC bug to me. I imagine, you have unresolved symbols linker error in real life?
– SergeyA
Dec 28 '18 at 16:36
Looks like MSVC bug to me. I imagine, you have unresolved symbols linker error in real life?
– SergeyA
Dec 28 '18 at 16:36
yes @SergeyA, I'm trying porting this repo to Windows: github.com/zhangxaochen/surfelmeshing, which produces the same error (I think so)... currently I have to move the non-specialized function body outside the class as a workaround, but wondering if there is a standard solution.
– zhangxaochen
Dec 28 '18 at 16:44
yes @SergeyA, I'm trying porting this repo to Windows: github.com/zhangxaochen/surfelmeshing, which produces the same error (I think so)... currently I have to move the non-specialized function body outside the class as a workaround, but wondering if there is a standard solution.
– zhangxaochen
Dec 28 '18 at 16:44
You might try to submit bugreport to MSFT? As an alternative, you might use a non-MSVC compiler for Windows - gcc (through MinGW) or CLang.
– SergeyA
Dec 28 '18 at 16:48
You might try to submit bugreport to MSFT? As an alternative, you might use a non-MSVC compiler for Windows - gcc (through MinGW) or CLang.
– SergeyA
Dec 28 '18 at 16:48
4
4
I'm voting to close this question as off-topic because it's a question for the MS support team about how they progressed with their bugfixes.
– Johannes Schaub - litb
Dec 28 '18 at 16:56
I'm voting to close this question as off-topic because it's a question for the MS support team about how they progressed with their bugfixes.
– Johannes Schaub - litb
Dec 28 '18 at 16:56
@SergeyA yes gcc should work, but I'm just curious... is inlining the specialized member functions a good way?
– zhangxaochen
Dec 28 '18 at 17:17
@SergeyA yes gcc should work, but I'm just curious... is inlining the specialized member functions a good way?
– zhangxaochen
Dec 28 '18 at 17:17
|
show 1 more comment
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53961411%2fdefinition-of-template-class-member-function-specialization-doesnt-emit-symbol%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53961411%2fdefinition-of-template-class-member-function-specialization-doesnt-emit-symbol%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Looks like MSVC bug to me. I imagine, you have unresolved symbols linker error in real life?
– SergeyA
Dec 28 '18 at 16:36
yes @SergeyA, I'm trying porting this repo to Windows: github.com/zhangxaochen/surfelmeshing, which produces the same error (I think so)... currently I have to move the non-specialized function body outside the class as a workaround, but wondering if there is a standard solution.
– zhangxaochen
Dec 28 '18 at 16:44
You might try to submit bugreport to MSFT? As an alternative, you might use a non-MSVC compiler for Windows - gcc (through MinGW) or CLang.
– SergeyA
Dec 28 '18 at 16:48
4
I'm voting to close this question as off-topic because it's a question for the MS support team about how they progressed with their bugfixes.
– Johannes Schaub - litb
Dec 28 '18 at 16:56
@SergeyA yes gcc should work, but I'm just curious... is inlining the specialized member functions a good way?
– zhangxaochen
Dec 28 '18 at 17:17