Click here to Skip to main content
15,881,248 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan5-Oct-22 22:47
mveRichard MacCutchan5-Oct-22 22:47 
GeneralMessage Closed Pin
6-Oct-22 4:42
Member 149687716-Oct-22 4:42 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan6-Oct-22 4:56
mveRichard MacCutchan6-Oct-22 4:56 
GeneralMessage Closed Pin
7-Oct-22 8:57
Member 149687717-Oct-22 8:57 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan7-Oct-22 9:25
mveRichard MacCutchan7-Oct-22 9:25 
Questionx86 Assembly Language Pin
Member 1578377429-Sep-22 23:51
Member 1578377429-Sep-22 23:51 
AnswerRe: x86 Assembly Language Pin
Richard Deeming30-Sep-22 0:14
mveRichard Deeming30-Sep-22 0:14 
Questiontype trait is_base_of compiles here but not there Pin
BernardIE531728-Sep-22 2:33
BernardIE531728-Sep-22 2:33 
Greetings Kind Regards Each of the two uses of the type trait is_base_of compiles differently. One w/ error the other w/o. Any idea why the difference? It is documented as requiring a completed type I am not certain as to its meaning but the question remains why the difference? Thank You Kindly

The precise error message wrt the requires expression is:

1>D:\a\_work\1\s\binaries\x86ret\inc\type_traits(1152,28): error C2139: 'cDERIVED': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_base_of'
hello_world.cpp(5): message : see declaration of 'cDERIVED'
hello_world.cpp(7): message : see reference to variable template 'const bool is_base_of_v<cbase,cderived>' being compiled
hello_world.cpp(9,2): error C7602: 'cDERIVED::someClass': the associated constraints are not satisfied
hello_world.cpp(8): message : see declaration of 'cDERIVED::someClass'
hello_world.cpp(7,32): message : the constraint was not satisfied
hello_world.cpp(9,22): error C2955: 'cDERIVED::someClass': use of class template requires template argument list
hello_world.cpp(8): message : see declaration of 'cDERIVED::someClass'
1>Done building project "hello_world.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Elapsed 00:02.511 ==========


C++
import std.core;
using namespace std;

class cBASE {};
struct cDERIVED : public cBASE
{
	template<typename T> requires is_base_of_v<cBASE, cDERIVED> // will not compile
	class someClass {};
	someClass<cDERIVED> someData;
	constexpr bool TEST_is_base_of() { return is_base_of_v<cBASE, cDERIVED>; } // will compile and return true
};

int main()
{
	cout << "Hello World\n";
	cout << boolalpha;

	cDERIVED _derived;
	cout << _derived.TEST_is_base_of();
}


modified 28-Sep-22 14:14pm.

QuestionRe: type trait is_base_of compiles here but not there Pin
jeron128-Sep-22 7:11
jeron128-Sep-22 7:11 
AnswerRe: type trait is_base_of compiles here but not there Pin
BernardIE531728-Sep-22 8:15
BernardIE531728-Sep-22 8:15 
QuestionDecimal point in floating point number in CSV under European locale Pin
Shao Voon Wong26-Sep-22 18:50
mvaShao Voon Wong26-Sep-22 18:50 
AnswerRe: Decimal point in floating point number in CSV under European locale Pin
Peter_in_278026-Sep-22 19:33
professionalPeter_in_278026-Sep-22 19:33 
GeneralRe: Decimal point in floating point number in CSV under European locale Pin
Shao Voon Wong26-Sep-22 19:39
mvaShao Voon Wong26-Sep-22 19:39 
GeneralRe: Decimal point in floating point number in CSV under European locale Pin
Peter_in_278026-Sep-22 20:36
professionalPeter_in_278026-Sep-22 20:36 
Question.hex file converter Pin
Muhammad Adnan 202224-Sep-22 21:18
Muhammad Adnan 202224-Sep-22 21:18 
AnswerRe: .hex file converter Pin
Victor Nijegorodov24-Sep-22 21:34
Victor Nijegorodov24-Sep-22 21:34 
AnswerRe: .hex file converter Pin
Richard MacCutchan25-Sep-22 3:43
mveRichard MacCutchan25-Sep-22 3:43 
GeneralRe: .hex file converter Pin
Muhammad Adnan 202225-Sep-22 7:14
Muhammad Adnan 202225-Sep-22 7:14 
GeneralRe: .hex file converter Pin
Richard MacCutchan25-Sep-22 7:19
mveRichard MacCutchan25-Sep-22 7:19 
GeneralRe: .hex file converter Pin
Dave Kreskowiak25-Sep-22 10:20
mveDave Kreskowiak25-Sep-22 10:20 
QuestionRe: .hex file converter Pin
CPallini26-Sep-22 2:26
mveCPallini26-Sep-22 2:26 
QuestionMessage Closed Pin
16-Sep-22 14:17
Member 1496877116-Sep-22 14:17 
AnswerRe: basic C++ question... Pin
k505417-Sep-22 4:56
mvek505417-Sep-22 4:56 
GeneralMessage Closed Pin
17-Sep-22 8:17
Member 1496877117-Sep-22 8:17 
AnswerRe: basic C++ question... Pin
David Crow17-Sep-22 15:44
David Crow17-Sep-22 15:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.