summaryrefslogtreecommitdiff
path: root/TAO/tests/CORBA_is_nil/README.md
blob: 224707f11ba07914f69395331d96a0d69e50c1c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# This test confirms that CORBA::is_nil works

TAO implements `CORBA::is_nil` as a function template, which merely
checks the argument for zero. The template is specialized for
`CORBA::Object_ptr`, and this specialization additionally checks
whether a non-NULL argument might be an unevaluated nil object
reference.

Because template specialization is used and not an ordinary overloaded
function, the specialized variant is *not* called for pointers to
derived classes. This will work only if TAO ensures that all nil
object references that have been narrowed to a derived class are
converted to null pointers, i.e., to ensure that the generic template
produces the corrcet result.

This test has the server return a nil object reference and the client
uses lazy resource usage, to comfirm that CORBA::is_nil corrcetly
identifies the nil object reference.