-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #366 from andreasfertig/fixIssue365
Fixed #365: `CXXDeductionGuideDecl` appeared in the middle of a template
- Loading branch information
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
template<long Len = 128, long BlockSize = 128, class T = wchar_t> | ||
class String { | ||
public: | ||
bool Format(const wchar_t FormatStr[], ...) { return true; } | ||
}; | ||
|
||
void FTest() { | ||
double d{}; | ||
|
||
String s; | ||
s.Format(L"%i", d); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
template<long Len = 128, long BlockSize = 128, class T = wchar_t> | ||
class String { | ||
public: | ||
bool Format(const wchar_t FormatStr[], ...) { return true; } | ||
}; | ||
|
||
/* First instantiated from: Issue365.cpp:10 */ | ||
#ifdef INSIGHTS_USE_TEMPLATE | ||
template<> | ||
class String<128, 128, wchar_t> | ||
{ | ||
|
||
public: | ||
inline bool Format(const wchar_t * FormatStr, ...) | ||
{ | ||
return true; | ||
} | ||
|
||
// inline constexpr String() noexcept = default; | ||
}; | ||
|
||
#endif | ||
|
||
|
||
|
||
/* First instantiated from: Issue365.cpp:10 */ | ||
#ifdef INSIGHTS_USE_TEMPLATE | ||
template<> | ||
String -> String<128, 128, wchar_t>; | ||
#endif | ||
|
||
void FTest() | ||
{ | ||
double d = {}; | ||
String<128, 128, wchar_t> s = String<128, 128, wchar_t>(); | ||
s.Format(L"%i", d); | ||
} | ||
|
||
|