All Questions
Tagged with using-directives using-declaration
10 questions
0
votes
1
answer
96
views
What's the relevance of the Note in [over.load]/1?
(You might see this question as a duplicate of this, but, to be honest, I've not really understood the matter, so I'm asking separately with my own wording.)
[over.load]/1 reads:
Not all function ...
1
vote
0
answers
54
views
Issues with C++ namespace across file and using directive
Here are a demo code from C++ primer plus about using using-directive and using-declaration across header files and cpp files, I've made some modification to remove the using declarations in other ...
1
vote
2
answers
136
views
Extremely basic question about namespaces in c++
using namespace X;
cout << var;
using Y::var;
cout << var;
So say I have a namespace X and a namespace Y that both contain a variable of type int called var. When I say using ...
3
votes
2
answers
161
views
Why can't a typedef type be used to declare its parent class' ctors? [duplicate]
template<typename>
struct A
{
int n;
A(bool)
{}
};
template<typename>
struct B
{
struct C : A<B>
{
using Base = A<B>;
using A<B>::A;...
1
vote
3
answers
366
views
namespace composition and selection
After reading The C++ Programming Language 4th edition (section 14.4.4 -
Composition and Selection) I thought that the following program would compile correctly:
#include <iostream>
namespace ...
1
vote
1
answer
291
views
Example of error caused by using directive in namespaces
I'm trying to understand what kind of errors could arise from including using declarations in namespaces. I'm taking into account these links.
I'm trying to create an example where an error is being ...
6
votes
2
answers
278
views
Name lookup in using-declaration via using-directive
Is the following program well-formed or ill-formed according to the c++ standard?
namespace N { int i; }
using namespace N;
using ::i;
int main() {}
I get different results with different compilers:
...
19
votes
3
answers
13k
views
using directive vs using declaration swap in C++
Please refer to the code below:
#include <algorithm>
namespace N
{
template <typename T>
class C
{
public:
void SwapWith(C & c)
{
using ...
1
vote
1
answer
116
views
include and using declaration
using ::bb::cascades::Application;
#include <bb/cascades/Application>
What do these two declaration mean?
And are there any good tutorials which states the using directive/declaration deeply?...
2
votes
4
answers
2k
views
How to use 'Using' keyword in ASP.NET page without code behind
I want to include some namespaces with their classes in my asp.net application. It is possible with using keyword ?
I have this:
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" ...